evil-collection
evil-collection copied to clipboard
vterm: bypass line wraps in the prompt line
When the command in the prompt line is so long that it wraps to multiple lines, movements such as h, l, ^, and $ IMHO behave unexpectedly. In normal terminal emulators outside of Emacs, a long prompt line contains only soft-wraps, i.e. being at the last character before a wrap and pressing <right> moves the cursor to the first character of the next line. This is also how vterm behaves without Evil. I am changing h and l to behave the same way.
While doing so, I am doing the same for ^ and $.
Just to easily illustrate behavior. When I press l without this patch, it does nothing. With this patch, it moves the cursor to the next line.

Similarly h goes to the previous line

This works in the visual mode as well.