From 803d3a7560a2588ca3bae7e5dae67a890fb021a2 Mon Sep 17 00:00:00 2001 From: Thaer Date: Thu, 2 Feb 2017 00:03:12 -0800 Subject: [PATCH] Only append guides to listchars if they don't exist. --- plugin/workspace.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/workspace.vim b/plugin/workspace.vim index 6ed3880..1df47af 100644 --- a/plugin/workspace.vim +++ b/plugin/workspace.vim @@ -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