Skip to content

Commit

Permalink
Cleanup cursor display in PasteRegisterMode.
Browse files Browse the repository at this point in the history
  • Loading branch information
keforbes committed May 31, 2012
1 parent 478995c commit 1dee047
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 1dee047

Please sign in to comment.