Skip to content

Commit 14225b5

Browse files
smhcprabirshrestha
authored andcommitted
Handle showcmd enabled (#205)
* Handle showcmd enabled * Also handle ruler if not using statusline * Better handle case of statusline enabled * Set theme jekyll-theme-merlot * Only truncate and add ellipses if there is room * Removed _config.yml file * Message output handles showcmd and ruler enabled
1 parent 735a279 commit 14225b5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

autoload/lsp/utils.vim

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,15 @@ function! lsp#utils#echo_with_truncation(msg) abort
143143
let l:msg = a:msg
144144
let l:winwidth = winwidth(0)
145145

146-
if l:winwidth < strdisplaywidth(l:msg)
146+
if &showcmd
147+
let l:winwidth -= 11
148+
endif
149+
150+
if &laststatus != 2 && &ruler
151+
let l:winwidth -= 18
152+
endif
153+
154+
if l:winwidth > 5 && l:winwidth < strdisplaywidth(l:msg)
147155
let l:msg = l:msg[:l:winwidth - 5] . '...'
148156
endif
149157

0 commit comments

Comments
 (0)