Skip to content

Commit

Permalink
Only append guides to listchars if they don't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
thaerkh committed Feb 2, 2017
1 parent 2911afb commit 803d3a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/workspace.vim
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,14 @@ function! s:ToggleIndentGuides(user_initiated)

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

let listchar_guides = ',tab:| ,trail:·'
if &g:listchars !~ listchar_guides
let &g:listchars = &g:listchars . listchar_guides
endif
setlocal concealcursor=inc
setlocal conceallevel=2
setlocal list

let b:toggle_indentguides = 0
else
syntax clear IndentGuideSpaces
Expand Down

0 comments on commit 803d3a7

Please sign in to comment.