mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 19:08:09 +01:00
vim: more cleanup and fixes for show_next/previous handlers
This commit is contained in:
parent
0f39d2c4de
commit
898b173a18
1 changed files with 9 additions and 12 deletions
|
@ -410,20 +410,19 @@ function! s:NM_show_previous(can_change_thread, find_matching)
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exec printf('norm %dG', msg['start'])
|
exec printf('norm %dGzt', msg['start'])
|
||||||
" TODO: try to fit the message on screen
|
" TODO: try to fit the message on screen
|
||||||
norm zz
|
|
||||||
return
|
return
|
||||||
endfor
|
endfor
|
||||||
if !a:can_change_thread
|
if !a:can_change_thread
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
call <SID>NM_kill_this_buffer()
|
call <SID>NM_kill_this_buffer()
|
||||||
if line('.') != line('0')
|
if line('.') > 1
|
||||||
norm k
|
norm k
|
||||||
call <SID>NM_search_show_thread()
|
call <SID>NM_search_show_thread()
|
||||||
norm G
|
norm G
|
||||||
call <SID>NM_show_previous(0)
|
call <SID>NM_show_previous(0, a:find_matching)
|
||||||
else
|
else
|
||||||
echo 'No more messages.'
|
echo 'No more messages.'
|
||||||
endif
|
endif
|
||||||
|
@ -440,14 +439,16 @@ function! s:NM_show_next(can_change_thread, find_matching)
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exec printf('norm %dG', msg['start'])
|
exec printf('norm %dGzt', msg['start'])
|
||||||
" TODO: try to fit the message on screen
|
" TODO: try to fit the message on screen
|
||||||
norm zz
|
|
||||||
return
|
return
|
||||||
endfor
|
endfor
|
||||||
if !a:can_change_thread
|
if a:can_change_thread
|
||||||
return
|
call <SID>NM_show_next_thread()
|
||||||
endif
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:NM_show_next_thread()
|
||||||
call <SID>NM_kill_this_buffer()
|
call <SID>NM_kill_this_buffer()
|
||||||
if line('.') != line('$')
|
if line('.') != line('$')
|
||||||
norm j
|
norm j
|
||||||
|
@ -465,10 +466,6 @@ function! s:NM_show_mark_read_then_archive_thread()
|
||||||
echo 'not implemented'
|
echo 'not implemented'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:NM_show_next_message()
|
|
||||||
echo 'not implemented'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:NM_show_mark_read_then_next_open_message()
|
function! s:NM_show_mark_read_then_next_open_message()
|
||||||
echo 'not implemented'
|
echo 'not implemented'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in a new issue