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:
parent
019a60e6d1
commit
58fcb0f30f
1 changed files with 5 additions and 0 deletions
|
|
@ -471,6 +471,11 @@ function! s:get_transactions(...) "{{{2
|
||||||
endf "}}}
|
endf "}}}
|
||||||
|
|
||||||
function! s:get_transaction_extents(lnum) "{{{2
|
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
|
" safe view / position
|
||||||
let view = winsaveview()
|
let view = winsaveview()
|
||||||
let fe = &foldenable
|
let fe = &foldenable
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue