From 0025d79a1dc010ec17e22867752bffbed6e8e111 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 14 Dec 2008 20:28:06 -0500 Subject: [PATCH] Allow [count]b == :[count]b --- common/content/tabs.js | 8 +++++++- vimperator/locale/en-US/tabs.txt | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/common/content/tabs.js b/common/content/tabs.js index 8742dc06..7bbcd293 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -249,7 +249,13 @@ function Tabs() //{{{ { mappings.add([modes.NORMAL], ["b"], "Open a prompt to switch buffers", - function () { commandline.open(":", "buffer! ", modes.EX); }); + function (count) + { + if (count != -1) + return tabs.switchTo(String(count)); + commandline.open(":", "buffer! ", modes.EX); + }, + { flags: Mappings.flags.COUNT }); mappings.add([modes.NORMAL], ["B"], "Show buffer list", diff --git a/vimperator/locale/en-US/tabs.txt b/vimperator/locale/en-US/tabs.txt index 98660b7c..eedbfc44 100644 --- a/vimperator/locale/en-US/tabs.txt +++ b/vimperator/locale/en-US/tabs.txt @@ -85,10 +85,10 @@ ________________________________________________________________________________ |b| |:b| |:buffer| ||:[count]b[uffer][!] [a][url|index][a]|| + -||b|| +||[count]b|| ________________________________________________________________________________ Go to the specified buffer from the buffer list. Argument can be either the -buffer index or the full URL. +buffer index or the full URL. If [count] is given, go to the [count]th buffer. If argument is neither a full URL nor an index but uniquely identifies a buffer, it is selected. With [!] the next buffer matching the argument is