From 94cfa81ccefecd3625f53d3b395db6d5578b8598 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Wed, 27 Apr 2022 23:58:30 +0430 Subject: janky fix --- vim-mode/vim_mode.pl | 15 ++++++++++++--- 1 file 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); -- cgit v1.2.3