You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cause of the error
Note the overlay in no buffer part of the backtrace. This is because lsp-lens--ensure-at makes an overlay from point-at-bol to (1+ point-at-eol), which, clipped, equals point-at-bol because the buffer is empty, creating an overlay that covers no text. This overlay immediately dies, because the evaporate property is enabled for it:
(-doto (make-overlay (point-max) (1+ (point-max)))
(overlay-put'evaporatet)) ;; result: `overlay in no buffer`
The text was updated successfully, but these errors were encountered:
nbfalcon
changed the title
lsp-lens-mode errors if lenses are at point-max (e.g. in an empty buffer)lsp-lens-mode errors if lenses are created in an empty buffer
Dec 25, 2020
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
An error is thrown if a lens from an LS is to be displayed at the end of the buffer, for example because the latter is empty.
To Reproduce
0.
M-x toggle-debug-on-error
haskell-language-server
as LS (the latter sends a lens for empty buffers)Expected behavior
Lenses should work.
Which Language Server did you use
haskell-language-server
OS
Ubuntu 20.04 LTS
Error callstack
The cause of the error
Note the
overlay in no buffer
part of the backtrace. This is becauselsp-lens--ensure-at
makes an overlay frompoint-at-bol
to (1+point-at-eol
), which, clipped, equalspoint-at-bol
because the buffer is empty, creating an overlay that covers no text. This overlay immediately dies, because theevaporate
property is enabled for it:The text was updated successfully, but these errors were encountered: