XVimProject / XVim2

Vim key-bindings for Xcode 9
MIT License
2.3k stars 181 forks source link

Copy & paste with named registers in visual mode is not working #263

Open eternityz opened 4 years ago

eternityz commented 4 years ago

macOS Catalina 10.15.1 Xcode 11.2 (11B52) XVim2 master branch (959bf30)

Action:

V to enter visual mode, j to select multiple lines, "ay to copy to named register a, then "ap to paste.

Expected result:

All the selected lines should be pasted.

Actual result:

Only the first line selected is pasted.

pebble8888 commented 4 years ago

The cause of the problem is here, although fixing is not easy.

XVimVisualEvaluator.m

- (void)becameHandler
{
    ...
    [self.sourceView xvim_moveToPosition:self.initialFromPos];
    [self.sourceView xvim_changeSelectionMode:_visual_mode];
    [self.sourceView xvim_moveToPosition:self.initialToPos];