Skip to content

Commit b5cf60f

Browse files
committed
Makes the items moving work properly for plain list (#13)
1 parent 3a2f893 commit b5cf60f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/vim-todo-lists.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ function! VimTodoListsMoveSubtree(lineno, position)
181181
" where it was before
182182
call cursor(l:cursor_pos[1], l:cursor_pos[4])
183183
else
184-
execute 'normal! P'
184+
if VimTodoListsItemIsNotDone(getline(a:position))
185+
execute 'normal! p'
186+
else
187+
execute 'normal! P'
188+
endif
185189
" In case of moving item up the text became one longer by a subtree length
186190
call cursor(l:cursor_pos[1] + l:subtree_length, l:cursor_pos[4])
187191
endif

0 commit comments

Comments
 (0)