evil icon indicating copy to clipboard operation
evil copied to clipboard

Visual line motions are screen-line motions

Open aaronjensen opened this issue 1 year ago • 14 comments
trafficstars

Operations like dj do not work as expected when evil-respect-visual-line-mode is t. It deletes to where the j motion would go, rather than deleting the current line and the next line.

This change makes them work, but I do not know what other impact it may have. Any guidance on testing or accomplishing this in another way would be appreciated. Thank you.

aaronjensen avatar Apr 25 '24 12:04 aaronjensen

The line type is not right here - will that not make them operate on logical lines? Instead, could you try changing to the screen-line type?

axelf4 avatar Apr 25 '24 17:04 axelf4

That seems to work too. I don't know the difference between the two. Aren't visual lines logical lines? Or does that mean something else?

aaronjensen avatar Apr 25 '24 18:04 aaronjensen

In Emacs terminology a single logical line (terminated by a \n) can be soft-wrapped as several visual lines.^1

axelf4 avatar Apr 25 '24 18:04 axelf4

Ah, not what I expected "logical" to mean. Thanks. I updated the PR.

aaronjensen avatar Apr 25 '24 18:04 aaronjensen

@axelf4 does this one look OK? anything else I should update?

aaronjensen avatar Jul 13 '24 19:07 aaronjensen