Get linescount in a more conventional way
This should solve issue #5 see https://github.com/dbeniamine/todo.txt-vim/issues/5
This commit is contained in:
@@ -188,11 +188,12 @@ function! todo#HierarchicalSort(symbol, symbolsub, dolastsort)
|
|||||||
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"
|
||||||
let l:linecount=getpos(".")[1]
|
let l:linecount=getpos(".")[1]
|
||||||
if(exists("g:Todo_txt_debug"))
|
if(exists("g:Todo_txt_debug"))
|
||||||
echo "Linescount: ".l:linecount
|
echo "Linescount: ".l:linecount
|
||||||
|
endif
|
||||||
execute "silent normal gg"
|
execute "silent normal gg"
|
||||||
|
|
||||||
" Get all the groups names
|
" Get all the groups names
|
||||||
@@ -205,6 +206,9 @@ function! todo#HierarchicalSort(symbol, symbolsub, dolastsort)
|
|||||||
" Sort by groups
|
" Sort by groups
|
||||||
execute 'sort'.l:sortmode.' /.\{-}\ze'.a:symbol.'/'
|
execute 'sort'.l:sortmode.' /.\{-}\ze'.a:symbol.'/'
|
||||||
for l:g in l:groups
|
for l:g in l:groups
|
||||||
|
let l:pat=a:symbol.l:g.'.*$'
|
||||||
|
if(exists("g:Todo_txt_debug"))
|
||||||
|
echo l:pat
|
||||||
endif
|
endif
|
||||||
normal gg
|
normal gg
|
||||||
" Find the beginning of the group
|
" Find the beginning of the group
|
||||||
|
|||||||
Reference in New Issue
Block a user