Add: prioritize update the priority

When there is already a priority in the line, we update it instead of adding
a new one
This commit is contained in:
David Beniamine
2015-03-13 10:03:32 -03:00
parent d3d06926a6
commit 2efc471969

View File

@@ -111,8 +111,12 @@ function! TodoTxtPrioritizeDecrease()
normal! 0f)h
endfunction
function! TodoTxtPrioritizeAdd (priority)
function! TodoTxtPrioritizeAdd (priority)
let line=getline('.')
if line !~ '^([A-F])'
:call TodoTxtPrioritizeAddAction(a:priority)
else
exec ':s/^([A-F])/('.a:priority.')/'
endif
endfunction