Skip to content

Commit 4cfb5cf

Browse files
committed
Fixes the error message when there is no items in a buffer (#9)
This commit fixes the error message when user tries to navigate the buffer that doesn't contain items.
1 parent cfd243a commit 4cfb5cf

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Changelog
124124

125125
* Added items toggling in visual mode
126126
* Improves work with indentations of list items
127+
* Fixed the error when trying to navigate the buffer that doesn't contain items
127128

128129
Credits
129130
-------

doc/vim-todo-lists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*vim-todo-lists.txt* Version 0.2.0
1+
*vim-todo-lists.txt* Version 0.3.0
22
*vim-todo-lists*
33

44
Plugin for TODO lists management.
@@ -156,6 +156,7 @@ SOFTWARE.
156156

157157
* Added items toggling in visual mode
158158
* Improves work with indentations of list items
159+
* Fixed the error when trying to navigate the buffer that doesn't contain items
159160

160161
==============================================================================
161162
8. Credits *VimTodoListsCredits*

plugin/vim-todo-lists.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ endfunction
9393
" Moves te cursor to the next item
9494
function! VimTodoListsGoToNextItem()
9595
normal! $
96-
silent exec '/^\s*\[.\]'
97-
silent exec 'noh'
96+
silent! exec '/^\s*\[.\]'
97+
silent! exec 'noh'
9898
normal! f[
9999
normal! l
100100
endfunction
@@ -103,8 +103,8 @@ endfunction
103103
" Moves te cursor to the previous item
104104
function! VimTodoListsGoToPreviousItem()
105105
normal! 0
106-
silent exec '?^\s*\[.\]'
107-
silent exec 'noh'
106+
silent! exec '?^\s*\[.\]'
107+
silent! exec 'noh'
108108
normal! f[
109109
normal! l
110110
endfunction

0 commit comments

Comments
 (0)