From a389d7ebd73145842273209f27ca088213e73ed7 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Tue, 29 Oct 2013 13:06:02 +0100 Subject: [PATCH] Make i_ work in an empty line --- autoload/vimwiki/lst.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/vimwiki/lst.vim b/autoload/vimwiki/lst.vim index 63789c0..07c757a 100644 --- 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