Skip to content

Commit bf8262c

Browse files
authored
Prevent reference count string from jumping into the next line because of the window divider's width not taken into account (#673)
Note that the leeway is hardcoded to 1 because that's just how it is in TTY. TTY ignores window-divider-width
1 parent 98d0ad0 commit bf8262c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lsp-ui-peek.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,12 @@ XREFS is a list of references/definitions."
319319
'face 'lsp-ui-peek-filename
320320
'file filename
321321
'xrefs xrefs)
322-
(propertize " " 'display `(space :align-to (- right-fringe ,(1+ (length len-str)))))
322+
(propertize " " 'display `(space :align-to (- right-fringe
323+
;; Account for Emacs TTY's window divider
324+
;; Without this leeway, the reference count
325+
;; string goes to next line - impairs readability
326+
,(if (display-graphic-p) 0 1)
327+
,(1+ (length len-str)))))
323328
(propertize len-str 'face 'lsp-ui-peek-filename))
324329
lsp-ui-peek--list)))
325330
(setq lsp-ui-peek--list (nreverse lsp-ui-peek--list))

0 commit comments

Comments
 (0)