emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.04k stars 140 forks source link

When sideline + text is longer than one line, sideline pushes the text to the right #304

Open goranmoomin opened 5 years ago

goranmoomin commented 5 years ago

When sideline tries to render on lines where there is not enough space (maybe this is because sideline has no more lines to display on the top), sideline pushes the text to the right, causing errors like these:

스크린샷 2019-07-09 오후 10 11 44

You can see the code wrapped because of the sideline.

I'm not 100% sure, but it looks like it's an error when:

  1. The width is narrow enough that for every line, the sideline's length + code's length exceeds the buffer's width
  2. The sideline tries to find a line that it can display itself
  3. Sideline tries to display itself on line '-1' since there is no text there
  4. Sideline pushes the text on line 0.

I didn't debug any elisp, these are just some heuristics based on the sideline's behavior. (It may be incorrect.)

JulienPalard commented 3 years ago

Happen to me here too:

2021-06-08-141421_1920x1080_scrot

Notice how the class from class Dice: is "left-shifted" to the end of the previous line.