[Vimpulse] Arrow keys don't work as motions

Nick Smallbone nick.smallbone at gmail.com
Thu Aug 19 03:43:15 CEST 2010


Typing a special key such as <right> in Operating-Pending mode currently
causes Vimpulse to crash in vimpulse-range. I've included a patch that
fixes this, so that (for example) y right yanks the character under
point, as it does in Vim.

However, after fixing this bug there is another problem. Namely, if I
type y 2 right (to yank two characters), the keypress parser continues
waiting for input so that the echo line reads
   y 2 right-
and it keeps on accepting more input no matter how many times I press
right, until I press a non-special-key motion such as $, when it finally
runs the command.

I couldn't work out what was going on here, so I gave up. The patch for
the first bug is below, though.

Oh, and thanks for Vimpulse! It's brilliant!


diff --git a/vimpulse-operator.el b/vimpulse-operator.el
index 4b1f594..b4ff648 100644
--- a/vimpulse-operator.el
+++ b/vimpulse-operator.el
@@ -220,8 +220,9 @@ (defun vimpulse-range
         (message oldmsg)
         ;; With doubled operator ("gqgq" or "gqq"), set motion to current line.
         (if (or (eq vimpulse-this-motion vimpulse-this-operator)
-                (member (vimpulse-strip-prefix (this-command-keys) t)
-                        '("g??" "gUU" "gqq" "guu" "gww" "g~~")))
+                (member (vimpulse-strip-prefix (this-command-keys))
+                        (mapcar 'string-to-vector
+                                '("g??" "gUU" "gqq" "guu" "gww" "g~~"))))
             (setq vimpulse-this-motion 'vimpulse-line)
           (setq vimpulse-this-motion
                 (vimpulse-operator-remapping vimpulse-this-motion))))

More information about the implementations-list mailing list