aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-05 19:55:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-05 19:55:36 +1200
commitef40ec975da8cfd65c83b18ee377e7018db6c852 (patch)
tree9d04115e6349021066c7dbff630eace7ac447783
parentMerge branch 'release/v8.29.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-ef40ec975da8cfd65c83b18ee377e7018db6c852.tar.gz
dotfiles-ef40ec975da8cfd65c83b18ee377e7018db6c852.zip
Merge branch 'hotfix/v8.29.1'v8.29.1
* hotfix/v8.29.1: Pass paths correctly in undoskip.vim
-rw-r--r--VERSION4
-rw-r--r--vim/plugin/undoskip.vim11
2 files changed, 5 insertions, 10 deletions
diff --git a/VERSION b/VERSION
index 432d8a02..d22ac1a3 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v8.29.0
-Tue, 05 May 2020 07:24:39 +0000
+tejr dotfiles v8.29.1
+Tue, 05 May 2020 07:54:17 +0000
diff --git a/vim/plugin/undoskip.vim b/vim/plugin/undoskip.vim
index af66f480..2471d6b0 100644
--- a/vim/plugin/undoskip.vim
+++ b/vim/plugin/undoskip.vim
@@ -28,7 +28,7 @@ if !exists('g:undoskip')
endif
" Internal function returns a local value for 'undofile'
-function s:CheckUndoSkip() abort
+function s:CheckUndoSkip(path) abort
" If this isn't a normal buffer, don't save undo data
if &buftype !=# ''
@@ -37,9 +37,8 @@ function s:CheckUndoSkip() abort
" Get the path from the buffer name; if that path matches any of the
" patterns, don't save undo data
- let path = bufname('%')
for glob in g:undoskip
- if path =~# glob2regpat(glob)
+ if a:path =~# glob2regpat(glob)
return 0
endif
endfor
@@ -49,13 +48,9 @@ function s:CheckUndoSkip() abort
endfunction
-" Command interface into the private function's value, does the actual set
-command -nargs=0 CheckUndoSkip
- \ let &l:undofile = s:CheckUndoSkip()
-
" Check the path on every buffer rename, create, or read
augroup undoskip
autocmd!
autocmd BufAdd,BufNewFile,BufRead *
- \ CheckUndoSkip
+ \ let &l:undofile = s:CheckUndoSkip(expand('<amatch>'))
augroup END