Skip to content

Commit

Permalink
[lsp-ui-sideline] Set maximum height for text in sideline
Browse files Browse the repository at this point in the history
markdown-mode sometime renders text with bigger text, which break
sideline's rendering
  • Loading branch information
sebastiencs authored and brotzeit committed Jul 18, 2020
1 parent 7d53264 commit 1f3e970
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lsp-ui-sideline.el
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ CURRENT is non-nil when the point is on the symbol."
(add-face-text-property 0 len 'lsp-ui-sideline-global nil str)
(concat
(propertize " " 'display `(space :align-to (- right-fringe ,(lsp-ui-sideline--align len margin))))
str)))
(propertize str 'display '(height 1)))))

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

0 comments on commit 1f3e970

Please sign in to comment.