emacs-evil / evil

The extensible vi layer for Emacs.
GNU General Public License v3.0
3.29k stars 276 forks source link

Visual line motions are screen-line motions #1890

Open aaronjensen opened 2 months ago

aaronjensen commented 2 months ago

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.

axelf4 commented 2 months ago

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?

aaronjensen commented 2 months ago

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?

axelf4 commented 2 months ago

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

aaronjensen commented 2 months ago

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

aaronjensen commented 1 day ago

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