diff options
author | Tom Feist <shabble@metavore.org> | 2016-08-25 01:29:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-25 01:29:20 +0000 |
commit | 67f236729177a62a370b3d7cb7e4a4c91baf8f41 (patch) | |
tree | 720731a1b2a73f4a0ff6a82a37c3f33ecc2330f9 /history-search/rl_history_search.pl | |
parent | add note to readme about possible stale files (diff) | |
parent | Fix use of uninitialized value (diff) | |
download | irssi-scripts-67f236729177a62a370b3d7cb7e4a4c91baf8f41.tar.gz irssi-scripts-67f236729177a62a370b3d7cb7e4a4c91baf8f41.zip |
Merge pull request #25 from hjan/master
Fix use of uninitialized value in rl_history_match checking
Diffstat (limited to 'history-search/rl_history_search.pl')
-rw-r--r-- | history-search/rl_history_search.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/history-search/rl_history_search.pl b/history-search/rl_history_search.pl index 7402a83..1fe9923 100644 --- a/history-search/rl_history_search.pl +++ b/history-search/rl_history_search.pl @@ -396,9 +396,10 @@ sub next_match { sub update_input { my $match = get_history_match(); - # TODO: Use of uninitialized value in subroutine entry at /Users/shabble/projects/tmp/test/irssi-shab/scripts/rl_history_search.pl line 399. - Irssi::gui_input_set($match); # <--- here. - Irssi::gui_input_set_pos(length $match); + if ($match) { + Irssi::gui_input_set($match); + Irssi::gui_input_set_pos(length $match); + } } sub handle_keypress { |