commit a389d7ebd73145842273209f27ca088213e73ed7
parent 0be8924759138452888019e95a2e555db4284807
Author: EinfachToll <istjanichtzufassen@googlemail.de>
Date: Tue, 29 Oct 2013 13:06:02 +0100
Make i_<c-t> work in an empty line
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/autoload/vimwiki/lst.vim b/autoload/vimwiki/lst.vim
@@ -1053,7 +1053,12 @@ endfunction "}}}
function! s:change_level(from_line, to_line, direction, plus_children) "{{{
let from_item = s:get_corresponding_item(a:from_line)
if from_item.type == 0
- execute a:from_line.','.a:to_line. (a:direction == 'increase' ? '>' : '<')
+ if a:direction == 'increase' && a:from_line == a:to_line && empty(getline(a:from_line))
+ "that's because :> doesn't work on an empty line
+ normal! gi
+ else
+ execute a:from_line.','.a:to_line. (a:direction == 'increase' ? '>' : '<')
+ endif
return
endif
if a:from_line == a:to_line