vim. make sure cursor/line is on a transaction

Thanks to Chad Voegele for reporting and fixing this in
the first place.
This commit is contained in:
Johann Klähn 2010-09-08 22:31:42 +02:00
parent 019a60e6d1
commit 58fcb0f30f

View file

@ -471,6 +471,11 @@ function! s:get_transactions(...) "{{{2
endf "}}}
function! s:get_transaction_extents(lnum) "{{{2
if ! (indent(a:lnum) || getline(a:lnum) =~ '^[~[:digit:]]\S\+')
" only do something if lnum is in a transaction
return [0, 0]
endif
" safe view / position
let view = winsaveview()
let fe = &foldenable