mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
vim: fix some error checking in NM_search_thread_id()
This commit is contained in:
parent
29b420700e
commit
e2fd1d9970
1 changed files with 8 additions and 5 deletions
|
@ -351,12 +351,15 @@ function! s:NM_search_thread_id()
|
||||||
if !exists('b:nm_raw_lines')
|
if !exists('b:nm_raw_lines')
|
||||||
echoe 'no b:nm_raw_lines'
|
echoe 'no b:nm_raw_lines'
|
||||||
return ''
|
return ''
|
||||||
else
|
|
||||||
let line = line('.')
|
|
||||||
let info = b:nm_raw_lines[line-1]
|
|
||||||
let what = split(info, '\s\+')[0]
|
|
||||||
return what
|
|
||||||
endif
|
endif
|
||||||
|
let mnum = line('.') - 1
|
||||||
|
if len(b:nm_raw_lines) <= mnum
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
echo 'len=' . string(len(b:nm_raw_lines)) . ' mnum=' . string(mnum)
|
||||||
|
let info = b:nm_raw_lines[mnum]
|
||||||
|
let what = split(info, '\s\+')[0]
|
||||||
|
return what
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:NM_search_add_remove_tags(prompt, prefix, intags)
|
function! s:NM_search_add_remove_tags(prompt, prefix, intags)
|
||||||
|
|
Loading…
Reference in a new issue