Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit 803d3a7

Browse files
committed
Only append guides to listchars if they don't exist.
1 parent 2911afb commit 803d3a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugin/workspace.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,14 @@ function! s:ToggleIndentGuides(user_initiated)
226226

227227
" TODO-TK: local and global listchars are the same, and s: variables are failing (??)
228228
let g:original_listchars = get(g:, 'original_listchars', &g:listchars)
229-
let &g:listchars = &g:listchars . ',tab:| ,trail:·'
230229

230+
let listchar_guides = ',tab:| ,trail:·'
231+
if &g:listchars !~ listchar_guides
232+
let &g:listchars = &g:listchars . listchar_guides
233+
endif
231234
setlocal concealcursor=inc
232235
setlocal conceallevel=2
233236
setlocal list
234-
235237
let b:toggle_indentguides = 0
236238
else
237239
syntax clear IndentGuideSpaces

0 commit comments

Comments
 (0)