Skip to content

Commit

Permalink
due to auto-inserting, we should delete, then replace
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmay committed Nov 19, 2016
1 parent b09ad71 commit 25486f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions XVim/XVimReplaceEvaluator.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ - (XVimEvaluator*)eval:(XVimKeyStroke*)keyStroke{
}
nextEvaluator = nil;
}
if (relayEvent) {
NSEvent *event = [keyStroke toEventwithWindowNumber:0 context:nil];
[self.sourceView interpretKeyEvents:[NSArray arrayWithObject:event]];
}
if (newlinePressed) {
XVimMotion* m = XVIM_MAKE_MOTION(MOTION_FORWARD, CHARACTERWISE_EXCLUSIVE, MOTION_OPTION_NONE, 1);
[self.sourceView xvim_delete:m andYank:NO];
}
if (relayEvent) {
NSEvent *event = [keyStroke toEventwithWindowNumber:0 context:nil];
[self.sourceView interpretKeyEvents:[NSArray arrayWithObject:event]];
}
}
}
return nextEvaluator;
Expand Down

0 comments on commit 25486f8

Please sign in to comment.