New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp-lens-mode breaks end-of-visual-line #677
Comments
|
It does not work only if you place the cursor at first char of the line. Here it is minimal code to reproduce the issue:
This behaviour is either a emacs bug or the expected behavour when there is overlay with before-string set which contains \n. (CC @Eli-Zaretskii) |
|
Lisp programs that futz with overlay strings with embedded newlines and then move visually should be prepared to deal with potential trouble. In this case, when you are at the beginning of the line, are you before the before-string or after it? If before, then the visual line ends at the newline embedded in the overlay string, right? I made a change on the master branch to handle this case, hope I didn't break anything else by doing that. In general, Lisp programs are well advised to stay away of such techniques. Thanks. |
* src/indent.c (Fvertical_motion): Get out of overlay strings with embedded newlines even if moving within the same screen line. See emacs-lsp/lsp-mode#677 for more details. Fix test for IT_CHARPOS being at the beginning of the accessible portion of the buffer.
I guess this was the problem. Closing based on the previous comment. |
Describe the bug
With lsp-lens-mode enabled, when at the start of a line that follows a lens,
end-of-visual-linedoes nothing. The point is not moved at the end of the line.end-of-linedoesn't have this issue.To Reproduce
M-x lsp-lens-mode RET M-g c 59 RET M-: (end-of-visual-line) RETExpected behavior
end-of-visual-lineshould have the usual behavior, point should be moved at the end of the line.Which Language Server did you use
ocamlmerlin-lsp
OS
debian strech, emacs 27 from git
Error callstack
The text was updated successfully, but these errors were encountered: