From 1dee047d6379fa95942289da67eb3f0478ca9b6f Mon Sep 17 00:00:00 2001 From: keforbes Date: Wed, 30 May 2012 20:35:17 -0600 Subject: [PATCH] Cleanup cursor display in PasteRegisterMode. --- .../vrapper/vim/modes/commandline/PasteRegisterMode.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/modes/commandline/PasteRegisterMode.java b/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/modes/commandline/PasteRegisterMode.java index 0f5c7f161..b98be9f77 100644 --- a/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/modes/commandline/PasteRegisterMode.java +++ b/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/modes/commandline/PasteRegisterMode.java @@ -58,12 +58,14 @@ public PasteRegisterParser(EditorAdaptor vim) { @Override public void type(KeyStroke e) { - if (e.equals(KEY_RETURN) || e.equals(KEY_ESCAPE) || e.equals(KEY_CTRL_C)) { + if (e.equals(KEY_RETURN) || e.equals(KEY_ESCAPE) || e.equals(KEY_CTRL_C) + || (buffer.length() == 1 && e.equals(KEY_BACKSP))) { editor.changeModeSafely(InsertMode.NAME); return; } - buffer.append(e.getCharacter()); + super.type(e); + //first character is '"', take the second character and use it if(buffer.length() > 1) { Command command = parseAndExecute("\"", ""+e.getCharacter());