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

`lsp-ui-doc-show` affects line number display width of `display-line-number-mode` #620

Open UniverseFly opened 3 years ago

UniverseFly commented 3 years ago

After lsp-ui shows doc in a separate graphical window, the width of line number will become unexpectedly bigger. Steps to reproduce the problem:

  1. emacs -Q
  2. Load lsp-mode, lsp-ui
  3. Open a file and enable lsp & lsp-ui.
  4. Trigger lsp-ui-doc-show.
  5. M-x display-line-numbers-mode

The emacs window in the right side of the image below illustrates my problem, where the line number display width is bigger than that in the left side:

image

This problem is quite weird, and if I resize the window vertically, it all seems fine:

image
jcs090218 commented 3 years ago

I still don't know the reason why but this is cause by function lsp-ui-doc--make-smaller-empty-lines using propertize with height less than 1. 😕