diff --git a/common/content/tabs.js b/common/content/tabs.js index db2daad0..e912268d 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -353,6 +353,27 @@ function Tabs() //{{{ literal: 0 }); + commands.add(["keepa[lt]"], + "Execute a command without changing the current alternate buffer", + function (args) + { + let alternate = tabs.alternate; + + try + { + liberator.execute(args[0], null, true); + } + finally + { + tabs.updateSelectionHistory([tabs.getTab(), alternate]); + } + }, + { + argCount: "+", + completer: function (context) completion.ex(context), + literal: 0 + }); + // TODO: this should open in a new tab positioned directly after the current one, not at the end commands.add(["tab"], "Execute a command and tell it to output in a new tab", @@ -1167,12 +1188,15 @@ function Tabs() //{{{ // alternate after a restart is often incorrectly tab 1 when there // shouldn't be one yet. /** - * Called on each TabSelect event to update the tab selection history. + * Sets the current and alternate tabs, updating the tab selection + * history. + * + * @param {Array(Object)} tabs The current and alternate tab. * @see tabs#alternate */ - updateSelectionHistory: function () + updateSelectionHistory: function (tabs) { - alternates = [this.getTab(), alternates[0]]; + alternates = tabs || [this.getTab(), alternates[0]]; } }; //}}} diff --git a/vimperator/NEWS b/vimperator/NEWS index 737a8272..a563dbca 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -18,6 +18,7 @@ (this might change again, as this is REALLY inconsistent, and i don't know if I like copying bugs) + * add [c]:keepalt[c] * add [c]:styledisable[c], [c]:styleenable[c], and [c]:styletoggle[c] * add [c]:sanitize[c], 'sanitizetimespan' and 'sanitizeitems' * add [c]:verbose[c] diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index ea6da9d7..bbe9757a 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -207,6 +207,7 @@ section::Ex{nbsp}commands[ex-cmd-index,:index] ||[c]:iunmap[c]|| Remove a mapping in Insert mode + ||[c]:javascript[c]|| Run a JavaScript command through eval() + ||[c]:jumps[c]|| Show jumplist + +||[c]:keepalt[c]|| Execute a command without changing the current alternate buffer + ||[c]:let[c]|| Set or list a variable + ||[c]:loadplugins[c]|| Immediately load all unloaded plugins + ||[c]:macros[c]|| List all macros + diff --git a/vimperator/locale/en-US/tabs.txt b/vimperator/locale/en-US/tabs.txt index 011324ac..6887839f 100644 --- a/vimperator/locale/en-US/tabs.txt +++ b/vimperator/locale/en-US/tabs.txt @@ -12,6 +12,21 @@ section::Listing{nbsp}tabs[listing-tabs] ________________________________________________________________________________ Show a list of buffers (=tabs) matching [a][filter][a]. Without [a][filter][a] list all tabs. + +A buffer may be marked with one of the following indicators: + +[frame="topbot",grid="none",cols="1,10"] +|=============================================================================== +|*%*|The current buffer +|*#*|The alternate buffer for [c]:e #[c] and [m][m] +|=============================================================================== +________________________________________________________________________________ + + +|:keepa| |:keepalt| + +||:keepa[lt] {cmd}|| +________________________________________________________________________________ +Execute a command without changing the current alternate buffer. ________________________________________________________________________________ section::Opening{nbsp}tabs[opening-tabs] diff --git a/xulmus/locale/en-US/all.txt b/xulmus/locale/en-US/all.txt index 3b026d62..b2d07f1f 100644 --- a/xulmus/locale/en-US/all.txt +++ b/xulmus/locale/en-US/all.txt @@ -2,6 +2,7 @@ // TODO: this should be generated by the Makefile in the same order as // config.helpFiles + |intro.html| include::intro.txt[] diff --git a/xulmus/locale/en-US/index.txt b/xulmus/locale/en-US/index.txt index 4a3c3f5d..5776bc09 100644 --- a/xulmus/locale/en-US/index.txt +++ b/xulmus/locale/en-US/index.txt @@ -246,6 +246,7 @@ section::Ex{nbsp}commands[ex-cmd-index,:index] ||[c]:iunmap[c]|| Remove a mapping in Insert mode + ||[c]:javascript[c]|| Run a JavaScript command through eval() + ||[c]:jumps[c]|| Show jumplist + +||[c]:keepalt[c]|| Execute a command without changing the current alternate buffer + ||[c]:let[c]|| Set or list a variable + ||[c]:load[c]|| Load a playlist + ||[c]:loadplugins[c]|| Immediately load all unloaded plugins + diff --git a/xulmus/locale/en-US/tabs.txt b/xulmus/locale/en-US/tabs.txt index f0b58992..c600d440 100644 --- a/xulmus/locale/en-US/tabs.txt +++ b/xulmus/locale/en-US/tabs.txt @@ -12,6 +12,21 @@ section::Listing{nbsp}tabs[listing-tabs] ________________________________________________________________________________ Show a list of buffers (=tabs) matching [a][filter][a]. Without [a][filter][a] list all tabs. + +A buffer may be marked with one of the following indicators: + +[frame="topbot",grid="none",cols="1,10"] +|=============================================================================== +|*%*|The current buffer +|*#*|The alternate buffer for [c]:e #[c] and [m][m] +|=============================================================================== +________________________________________________________________________________ + + +|:keepa| |:keepalt| +||:keepa[lt] {cmd}|| +________________________________________________________________________________ +Execute a command without changing the current alternate buffer. ________________________________________________________________________________ section::Opening{nbsp}tabs[opening-tabs]