Merge branch 'citec-fix_getcurpos_missing'
This commit is contained in:
@@ -23,6 +23,14 @@ endif
|
|||||||
|
|
||||||
" Functions {{{1
|
" Functions {{{1
|
||||||
|
|
||||||
|
|
||||||
|
function! todo#GetCurpos()
|
||||||
|
if exists("*getcurpos")
|
||||||
|
return getcurpos()
|
||||||
|
endif
|
||||||
|
return getpos('.')
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Increment and Decrement The Priority
|
" Increment and Decrement The Priority
|
||||||
:set nf=octal,hex,alpha
|
:set nf=octal,hex,alpha
|
||||||
|
|
||||||
@@ -35,7 +43,7 @@ function! todo#PrioritizeDecrease()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! todo#PrioritizeAdd (priority)
|
function! todo#PrioritizeAdd (priority)
|
||||||
let oldpos=getcurpos()
|
let oldpos=todo#GetCurpos()
|
||||||
let line=getline('.')
|
let line=getline('.')
|
||||||
if line !~ '^([A-F])'
|
if line !~ '^([A-F])'
|
||||||
:call todo#PrioritizeAddAction(a:priority)
|
:call todo#PrioritizeAddAction(a:priority)
|
||||||
@@ -179,7 +187,7 @@ function! todo#HierarchicalSort(symbol, symbolsub, dolastsort)
|
|||||||
let l:sortmodesub=Todo_txt_InsertSpaceIfNeeded(g:Todo_txt_second_level_sort_mode)
|
let l:sortmodesub=Todo_txt_InsertSpaceIfNeeded(g:Todo_txt_second_level_sort_mode)
|
||||||
let l:sortmodefinal=Todo_txt_InsertSpaceIfNeeded(g:Todo_txt_third_level_sort_mode)
|
let l:sortmodefinal=Todo_txt_InsertSpaceIfNeeded(g:Todo_txt_third_level_sort_mode)
|
||||||
|
|
||||||
" Count the number of lines
|
" Count the number of lines
|
||||||
let l:position= todo#GetCurpos()
|
let l:position= todo#GetCurpos()
|
||||||
execute "silent normal g\<c-g>"
|
execute "silent normal g\<c-g>"
|
||||||
let l:linecount=str2nr(split(v:statusmsg)[7])
|
let l:linecount=str2nr(split(v:statusmsg)[7])
|
||||||
|
|||||||
Reference in New Issue
Block a user