Skip to content

Commit 87aa304

Browse files
authored
Add space at the end of the modeline diagnostics and actions (#2100)
lsp-mode adds modeline diagnostics and code actions to the beginning of the global-mode-string. This means that if we want every global-mode-string construct to look correctly, we need to append, and not prepend, a space after our mode line string.
1 parent 62ad341 commit 87aa304

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lsp-modeline.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
(lsp-execute-code-action (lsp--select-action actions))))))
140140
built-string)
141141
(unless (string= "" built-string)
142-
(concat " " built-string))))
142+
(concat built-string " "))))
143143

144144
(defun lsp--modeline-update-code-actions (actions)
145145
"Update modeline with new code ACTIONS."
@@ -252,7 +252,7 @@ The `:global' workspace is global one.")
252252
(cl-labels ((calc-modeline ()
253253
(let ((str (lsp-modeline-diagnostics-statistics)))
254254
(if (string-empty-p str) ""
255-
(concat " " str)))))
255+
(concat str " ")))))
256256
(setq lsp-modeline--diagnostics-string
257257
(cl-case lsp-modeline-diagnostics-scope
258258
(:file (or lsp-modeline--diagnostics-string

0 commit comments

Comments
 (0)