Skip to content

Commit

Permalink
go.py 3.0: refresh immediately buffer input when /go command is executed
Browse files Browse the repository at this point in the history
With WeeChat >= 4.3.0, the signal "input_text_changed" is sent only when the
input text is actually changed.

When the /go command is bound to a key, we now have to manually force an update
of the bar item "input_text" so that the list of buffers is displayed
immediately, as it was with previous WeeChat versions.
  • Loading branch information
flashcode committed May 30, 2024
1 parent cff7453 commit 701ea42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/go.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#
# History:
#
# 2024-05-30, Sébastien Helleu <[email protected]>:
# version 3.0: refresh immediately buffer input when /go command is executed
# (needed for WeeChat >= 4.3.0)
# 2023-06-21, Sébastien Helleu <[email protected]>:
# version 2.9: add option "min_chars"
# 2023-01-08, Sébastien Helleu <[email protected]>:
Expand Down Expand Up @@ -100,7 +103,7 @@

SCRIPT_NAME = 'go'
SCRIPT_AUTHOR = 'Sébastien Helleu <[email protected]>'
SCRIPT_VERSION = '2.9'
SCRIPT_VERSION = '3.0'
SCRIPT_LICENSE = 'GPL3'
SCRIPT_DESC = 'Quick jump to buffers'

Expand Down Expand Up @@ -234,6 +237,7 @@ def go_hook_all():
if 'modifier' not in hooks:
hooks['modifier'] = weechat.hook_modifier(
'input_text_display_with_cursor', 'go_input_modifier', '')
weechat.bar_item_update('input_text')


def go_start(buf):
Expand Down

0 comments on commit 701ea42

Please sign in to comment.