From c90846d8c7918c8650f1f45cd74cf7ec9cf5160b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 28 May 2018 10:04:35 +1200 Subject: Use script variable to keep showbreak setting The 'showbreak' option is global and has no local value--that is, it's not global-local--so `setlocal` actually just changes the global value, and hence we can't "change back" using `setlocal showbreak<`. Instead, keep the "normal" value in a script variable so that we can reliably switch back to it. This surprised me, as I had thought it was working, but I can't find even an older Vim that behaves the way I expected it too. I suppose I must just not have changed back often enough to actually notice. --- vim/plugin/copy_linebreak.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/copy_linebreak.vim b/vim/plugin/copy_linebreak.vim index 9d241d5a..0924134c 100644 --- a/vim/plugin/copy_linebreak.vim +++ b/vim/plugin/copy_linebreak.vim @@ -17,7 +17,8 @@ let g:loaded_copy_linebreak = 1 " Enable copy-friendly linebreak options function! s:CopyLinebreakEnable() setlocal nolinebreak linebreak? - setlocal showbreak= + let s:showbreak = &showbreak + set showbreak= if exists('+breakindent') setlocal nobreakindent endif @@ -26,7 +27,7 @@ endfunction " Disable copy-friendly linebreak options function! s:CopyLinebreakDisable() setlocal linebreak linebreak? - setlocal showbreak< + let &showbreak = s:showbreak if exists('+breakindent') setlocal breakindent< endif -- cgit v1.2.3 From f99e8c46ec955e09b396188c4ede6f649bde8f6b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 28 May 2018 10:13:42 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 206fa15d..88a8e216 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v0.33.0 -Fri May 25 02:06:34 UTC 2018 +tejr dotfiles v0.34.0 +Sun May 27 22:13:33 UTC 2018 -- cgit v1.2.3