Skip to content

Commit 1f3e970

Browse files
sebastiencsbrotzeit
authored andcommitted
[lsp-ui-sideline] Set maximum height for text in sideline
markdown-mode sometime renders text with bigger text, which break sideline's rendering
1 parent 7d53264 commit 1f3e970

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lsp-ui-sideline.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ CURRENT is non-nil when the point is on the symbol."
258258
(add-face-text-property 0 len 'lsp-ui-sideline-global nil str)
259259
(concat
260260
(propertize " " 'display `(space :align-to (- right-fringe ,(lsp-ui-sideline--align len margin))))
261-
str)))
261+
(propertize str 'display '(height 1)))))
262262

263263
(defun lsp-ui-sideline--check-duplicate (symbol info)
264264
"Check if there's already a SYMBOL containing INFO, unless `lsp-ui-sideline-ignore-duplicate'
@@ -367,7 +367,7 @@ Push sideline overlays on `lsp-ui-sideline--ovs'."
367367
(add-face-text-property 0 len face nil message)
368368
message))
369369
(string (concat (propertize " " 'display `(space :align-to (- right-fringe ,(lsp-ui-sideline--align len margin))))
370-
message))
370+
(propertize message 'display '(height 1))))
371371
(pos-ov (lsp-ui-sideline--find-line len bol eol nil offset))
372372
(ov (and pos-ov (make-overlay (car pos-ov) (car pos-ov)))))
373373
(when pos-ov
@@ -412,7 +412,7 @@ Push sideline overlays on `lsp-ui-sideline--ovs'."
412412
(add-text-properties 0 len `(keymap ,keymap mouse-face highlight) title)
413413
title))
414414
(string (concat (propertize " " 'display `(space :align-to (- right-fringe ,(lsp-ui-sideline--align len margin))))
415-
title))
415+
(propertize title 'display '(height 1))))
416416
(pos-ov (lsp-ui-sideline--find-line (1+ (length title)) bol eol t))
417417
(ov (and pos-ov (make-overlay (car pos-ov) (car pos-ov)))))
418418
(when pos-ov

0 commit comments

Comments
 (0)