XVim2 icon indicating copy to clipboard operation
XVim2 copied to clipboard

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

Open eternityz opened this issue 6 years ago • 1 comments

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.

eternityz avatar Nov 04 '19 22:11 eternityz

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];

pebble8888 avatar Nov 05 '19 15:11 pebble8888