From 35de1d845dc8af07d64f11b866b0de6406187163 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 7 Jul 2018 18:21:45 +1200 Subject: Simplify cache variable --- autoload/insert_suspend_hlsearch.vim | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/autoload/insert_suspend_hlsearch.vim b/autoload/insert_suspend_hlsearch.vim index 3000ac1..2638abc 100644 --- a/autoload/insert_suspend_hlsearch.vim +++ b/autoload/insert_suspend_hlsearch.vim @@ -1,14 +1,12 @@ " Initialise option saving variable -if !exists('g:insert_suspend_hlsearch#save') - let g:insert_suspend_hlsearch#save = 0 -endif +let s:hlsearch = &hlsearch " Save the current value of the 'hlsearch' option in a script variable, and " disable it if enabled. Note that :nohlsearch does not work for this; see " :help autocmd-searchpat. function! insert_suspend_hlsearch#Suspend() abort - let g:insert_suspend_hlsearch#save = &hlsearch - if g:insert_suspend_hlsearch#save + let s:hlsearch = &hlsearch + if s:hlsearch set nohlsearch endif endfunction @@ -16,8 +14,7 @@ endfunction " Restore the value of 'hlsearch' from the last time s:HlsearchSuspend was " called. function! insert_suspend_hlsearch#Restore() abort - if g:insert_suspend_hlsearch#save + if s:hlsearch set hlsearch - unlet g:insert_suspend_hlsearch#save endif endfunction -- cgit v1.2.3 From b8199bd2120e4c7365b45d0f4428958b945050ba Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 7 Jul 2018 18:22:14 +1200 Subject: Bump VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1d0ba9e..8f0916f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.0 +0.5.0 -- cgit v1.2.3