From a2b9673ec108c5f66e6c2d8a8361aac5817f3a65 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 29 Sep 2010 21:31:33 +0200 Subject: vim_mode: Fix d at the end of the line. --- vim-mode/vim_mode.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index acc4f26..847ce6e 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -340,6 +340,9 @@ sub cmd_operator_d { } _input($input); + # Prevent moving after the text when we delete the last character. + $pos-- if $pos == length($input); + # Move the cursor at the right position. _input_pos($pos); } -- cgit v1.2.3