Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Remove adjacenttab #487

Merged
merged 1 commit into from
Oct 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions QA.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ The behaviors of the console are tested in [Console section](#consoles).
- [ ] Open new tab in background by `"background": true`
- [ ] Configure custom hint character by `:set hintchars=012345678`
- [ ] Configure custom hint character by settings `"hintchars": "012345678"` in add-on preferences
- [ ] Configure adjacent tab by `:set adjacenttab`
- [ ] Configure adjacent tab by settings `adjacenttab: true` in add-on preferences
- [ ] Opened tabs is in child on Tree Style Tab

### Consoles
Expand Down
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ settings:
```json
{
"properties": {
"adjacenttab": false
"complete": "sbh"
}
}
```
Expand All @@ -219,19 +219,6 @@ Set hint characters
:set hintchars=0123456789
```

#### `adjacenttab` property

Open a new tab on adjacent of the current tab.

```
:set noadjacenttab " open a tab at last
:set adjacenttab " open a tab adjacently
```

For developers and contributors: you can look at
[#303](https://github.com/ueokande/vim-vixen/pull/303) for more details about
properties implementation and usage.

### Search engines

Vim Vixen supports search by search engines like Google and Yahoo.
Expand Down
12 changes: 0 additions & 12 deletions src/background/presenters/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,6 @@ export default class TabPresenter {
return browser.tabs.setZoom(tabId, factor);
}

async createAdjacent(url, { openerTabId, active }) {
let tabs = await browser.tabs.query({
active: true, currentWindow: true
});
return browser.tabs.create({
url,
openerTabId,
active,
index: tabs[0].index + 1
});
}

onSelected(listener) {
browser.tabs.onActivated.addListener(listener);
}
Expand Down
9 changes: 1 addition & 8 deletions src/background/usecases/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@ export default class LinkInteractor {
return this.tabPresenter.open(url, tabId);
}

async openNewTab(url, openerId, background) {
let settings = await this.settingRepository.get();
let { adjacenttab } = settings.properties;
if (adjacenttab) {
return this.tabPresenter.createAdjacent(url, {
openerTabId: openerId, active: !background
});
}
openNewTab(url, openerId, background) {
return this.tabPresenter.create(url, {
openerTabId: openerId, active: !background
});
Expand Down
1 change: 0 additions & 1 deletion src/shared/settings/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default {
"properties": {
"hintchars": "abcdefghijklmnopqrstuvwxyz",
"smoothscroll": false,
"adjacenttab": true,
"complete": "sbh"
},
"blacklist": [
Expand Down
3 changes: 0 additions & 3 deletions src/shared/settings/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
const types = {
hintchars: 'string',
smoothscroll: 'boolean',
adjacenttab: 'boolean',
complete: 'string',
};

// describe default values of a property
const defaults = {
hintchars: 'abcdefghijklmnopqrstuvwxyz',
smoothscroll: false,
adjacenttab: true,
complete: 'sbn',
};

const docs = {
hintchars: 'hint characters on follow mode',
smoothscroll: 'smooth scroll',
adjacenttab: 'open adjacent tabs',
complete: 'which are completed at the open page',
};

Expand Down