aboutsummaryrefslogtreecommitdiffstats
path: root/weechat/python
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:56:49 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:56:49 +0200
commit0068ca0a56d161a879523288d81b94a11ed3d1da (patch)
tree0f0fe1bd8414036965540a8040b32468285039d8 /weechat/python
parent39b6e2bf1f94ed58cdef26568e7274290693d2c2 (diff)
downloaddotfiles-0068ca0a56d161a879523288d81b94a11ed3d1da.tar.xz
weechat: go.py: 2.4 -> 2.5
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'weechat/python')
-rw-r--r--weechat/python/go.py26
1 files changed, 17 insertions, 9 deletions
diff --git a/weechat/python/go.py b/weechat/python/go.py
index 3d1828b..a30f58f 100644
--- a/weechat/python/go.py
+++ b/weechat/python/go.py
@@ -21,12 +21,14 @@
#
# History:
#
+# 2017-04-01, Sébastien Helleu <flashcode@flashtux.org>:
+# version 2.5: add option "buffer_number"
# 2017-03-02, Sébastien Helleu <flashcode@flashtux.org>:
# version 2.4: fix syntax and indentation error
# 2017-02-25, Simmo Saan <simmo.saan@gmail.com>
# version 2.3: fix fuzzy search breaking buffer number search display
# 2016-01-28, ylambda <ylambda@koalabeast.com>
-# version 2.2: add option fuzzy_search
+# version 2.2: add option "fuzzy_search"
# 2015-11-12, nils_2 <weechatter@arcor.de>
# version 2.1: fix problem with buffer short_name "weechat", using option
# "use_core_instead_weechat", see:
@@ -42,7 +44,7 @@
# version 1.8: fix jump to non-active merged buffers (jump with buffer name
# instead of number)
# 2012-01-03 nils_2 <weechatter@arcor.de>
-# version 1.7: add option use_core_instead_weechat
+# version 1.7: add option "use_core_instead_weechat"
# 2012-01-03, Sébastien Helleu <flashcode@flashtux.org>:
# version 1.6: make script compatible with Python 3.x
# 2011-08-24, stfn <stfnmd@googlemail.com>:
@@ -56,9 +58,9 @@
# version 1.2: use high priority for hooks to prevent conflict with other
# plugins/scripts (WeeChat >= 0.3.4 only)
# 2010-03-25, Elián Hanisch <lambdae2@gmail.com>:
-# version 1.1: use a space for match the end of a string
+# version 1.1: use a space to match the end of a string
# 2009-11-16, Sébastien Helleu <flashcode@flashtux.org>:
-# version 1.0: add new option for displaying short names
+# version 1.0: add new option to display short names
# 2009-06-15, Sébastien Helleu <flashcode@flashtux.org>:
# version 0.9: fix typo in /help go with command /key
# 2009-05-16, Sébastien Helleu <flashcode@flashtux.org>:
@@ -90,7 +92,7 @@ from __future__ import print_function
SCRIPT_NAME = 'go'
SCRIPT_AUTHOR = 'Sébastien Helleu <flashcode@flashtux.org>'
-SCRIPT_VERSION = '2.4'
+SCRIPT_VERSION = '2.5'
SCRIPT_LICENSE = 'GPL3'
SCRIPT_DESC = 'Quick jump to buffers'
@@ -151,6 +153,9 @@ SETTINGS = {
'fuzzy_search': (
'off',
'search buffer matches using approximation'),
+ 'buffer_number': (
+ 'on',
+ 'display buffer number'),
}
# hooks management
@@ -434,10 +439,13 @@ def go_buffers_to_string(listbuf, pos, strinput):
name += buffer_name[prev_index+1:]
else:
name = buffer_name
- string += ' %s%s%s%s%s' % (
- weechat.color(weechat.config_get_plugin(
- 'color_number' + selected)),
- str(listbuf[i]['number']),
+ string += ' '
+ if go_option_enabled('buffer_number'):
+ string += '%s%s' % (
+ weechat.color(weechat.config_get_plugin(
+ 'color_number' + selected)),
+ str(listbuf[i]['number']))
+ string += '%s%s%s' % (
weechat.color(weechat.config_get_plugin(
'color_name' + selected)),
name,