|
24 | 24 | #
|
25 | 25 | # History:
|
26 | 26 | #
|
| 27 | +# 2023-01-08, Sébastien Helleu <[email protected]> |
| 28 | +# version 0.7: send buffer pointer with signal "input_text_changed" |
27 | 29 | # 2019-10-31, Simmo Saan <[email protected]>
|
28 | 30 | # version 0.6: fix hook_command_run hooks not being unhooked
|
29 |
| -# 2019-07-11, Sébastien Helleu <[email protected]>: |
| 31 | +# 2019-07-11, Sébastien Helleu <[email protected]> |
30 | 32 | # version 0.5: make script compatible with Python 3
|
31 | 33 | # 2019-07-11, Simmo Saan <[email protected]>
|
32 | 34 | # version 0.4: fix detection of "/input search_text_here"
|
|
43 | 45 |
|
44 | 46 | SCRIPT_NAME = "histsearch"
|
45 | 47 | SCRIPT_AUTHOR = "xt <[email protected]>"
|
46 |
| -SCRIPT_VERSION = "0.6" |
| 48 | +SCRIPT_VERSION = "0.7" |
47 | 49 | SCRIPT_LICENSE = "GPL3"
|
48 | 50 | SCRIPT_DESC = "Quick search in command history (think ctrl-r in bash)"
|
49 | 51 | SCRIPT_COMMAND = 'histsearch'
|
@@ -220,15 +222,15 @@ def command_run_input(data, buffer, command):
|
220 | 222 | if commands_pos >= len(commands):
|
221 | 223 | commands_pos = 0
|
222 | 224 | w.hook_signal_send("input_text_changed",
|
223 |
| - w.WEECHAT_HOOK_SIGNAL_STRING, "") |
| 225 | + w.WEECHAT_HOOK_SIGNAL_POINTER, buffer) |
224 | 226 | return w.WEECHAT_RC_OK_EAT
|
225 | 227 | elif command == "/input complete_previous":
|
226 | 228 | # choose previous buffer in list
|
227 | 229 | commands_pos -= 1
|
228 | 230 | if commands_pos < 0:
|
229 | 231 | commands_pos = len(commands) - 1
|
230 | 232 | w.hook_signal_send("input_text_changed",
|
231 |
| - w.WEECHAT_HOOK_SIGNAL_STRING, "") |
| 233 | + w.WEECHAT_HOOK_SIGNAL_POINTER, buffer) |
232 | 234 | return w.WEECHAT_RC_OK_EAT
|
233 | 235 | elif command == "/input return":
|
234 | 236 | # As in enter was pressed.
|
|
0 commit comments