feat: add yy to copy mode#82
Conversation
leohenon
left a comment
There was a problem hiding this comment.
copy mode pending y survives other handled keys.
Example: y j y triggers yy.
Since yy is the only supported y operator here, you can clear pending y when the next key is not y.
|
The 150ms flash delay is fine, but maybe copy mode should probably exit immediately after Also I think normal prompt yank flash uses 70ms, maybe we should also use 70ms here for consistency? |
|
This fixes We should clear pending |
|
we should probably also add a test for this, e.g. |
|
My bad. Will fix and add test |
|
This should be better now. I noticed that line 1049 and 1067 both have the same issue f H k will finish the jump to the next k on the line after the cursor moves. Would it be better to clear pending before the return always unless the key needs to stay in pending state? |
|
Thanks. Yes theres also an ordering issue for The
Other than that, this should be good. |
|
Thanks, just cleaned up a couple more things I noticed: yy was linewise, but should be charwise so pasting into the prompt doesn’t add an extra line. The exit delay was still 150ms but should match the 70ms yank flash. Also simplified the highlight code and stopped exposing the flash state. Implemented on ocv in 9049c0b |
add yy to copymode to copy current line in normal mode