Skip to content

Commit 2342780

Browse files
alanzyyoncho
authored andcommitted
margin calculation should allow for end-of-line indicator (#199)
* margin calculation should allow for end-of-line indicator In whitespace mode, the end of line marker adds am extra char. This should probably be detected via the approriate (if ..), but I have no idea how. Closes emacs-lsp/lsp-mode#499 * Test for whitespace mode, reduce margin if so
1 parent e8f3e7b commit 2342780

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lsp-ui-sideline.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ CURRENT is non-nil when the point is on the symbol."
247247
0)
248248
(if (bound-and-true-p display-line-numbers-mode)
249249
(+ 2 (line-number-display-width))
250+
0)
251+
(if (bound-and-true-p whitespace-mode)
252+
1
250253
0)))
251254

252255
(defun lsp-ui-sideline--window-width ()

0 commit comments

Comments
 (0)