aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-04-27 19:28:30 +0000
committerterminaldweller <thabogre@gmail.com>2022-04-27 19:28:30 +0000
commit94cfa81ccefecd3625f53d3b395db6d5578b8598 (patch)
treeb21077f102e89c1fac74eabc68936690b4d1fe12
parentMerge pull request #25 from hjan/master (diff)
downloadirssi-scripts-94cfa81ccefecd3625f53d3b395db6d5578b8598.tar.gz
irssi-scripts-94cfa81ccefecd3625f53d3b395db6d5578b8598.zip
janky fix
-rw-r--r--vim-mode/vim_mode.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 7158873..c253fdb 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -2740,7 +2740,7 @@ sub got_key {
_stop();
return;
- } elsif ($key == 10) { # enter.
+ } elsif ($key == 13) { # enter.
_commit_line();
} elsif ($input_buf_enabled and $imap) {
@@ -2923,11 +2923,19 @@ sub handle_command_cmd {
return 1; # call _stop()
}
+ # Counts
if (defined $pending_map and not $pending_map_flushed) {
$pending_map = $pending_map . $char;
$char = $pending_map;
}
+
+ # @DEVI
+ if ($key == 13) {
+ _commit_line();
+ return 0; # don't call _stop()
+ }
+
my $map;
if ($movement) {
$map = { char => $movement->{char},
@@ -3051,7 +3059,8 @@ sub handle_command_cmd {
}
# Enter key sends the current input line in command mode as well.
- } elsif ($key == 10) {
+ } elsif ($key == 13) {
+ print "we actually do end up here!";
_commit_line();
return 0; # don't call _stop()
@@ -3194,7 +3203,7 @@ sub handle_command_ex {
}
# Return key - execute command
- } elsif ($key == 10) {
+ } elsif ($key == 13) {
print "Run ex-mode command" if DEBUG;
cmd_ex_command();
_update_mode(M_CMD);