lib/vmail.vim in vmail-1.4.6 vs lib/vmail.vim in vmail-1.4.7
- old
+ new
@@ -226,13 +226,13 @@
echo "checking for new messages. please wait..."
let res = system(command)
if len(split(res, "\n", '')) > 0
setlocal modifiable
let line = line('$')
- $put =res
+ silent $put =res
setlocal nomodifiable
- write
+ write!
let num = len(split(res, '\n', ''))
call cursor(line + 1, 0)
normal z.
redraw
echom "you have " . num . " new message" . (num == 1 ? '' : 's') . "!"
@@ -273,13 +273,10 @@
call setline(lnum, newline)
let lnum += 1
endwhile
setlocal nomodifiable
write
- if nummsgs > 2
- " call feedkeys("\<cr>")
- endif
redraw
if nummsgs == 1
echom "toggled flag on message"
else
echom "toggled flags on " . nummsgs . " messages"
@@ -499,11 +496,11 @@
setlocal modifiable
let command = s:search_command . shellescape("100 all")
echo "loading messages..."
let res = system(command)
1,$delete
- put! =res
+ silent! put! =res
execute "normal Gdd\<c-y>"
normal G
setlocal nomodifiable
write
normal z.
@@ -531,13 +528,13 @@
redraw
call s:focus_list_window()
setlocal modifiable
echo "running query on " . s:mailbox . ": " . s:query . ". please wait..."
let res = system(command)
- 1,$delete
- put! =res
- execute "normal Gdd\<c-y>"
+ silent! 1,$delete
+ silent! put! =res
+ execute "silent normal Gdd\<c-y>"
setlocal nomodifiable
write
normal z.
endfunction
@@ -584,19 +581,22 @@
func! s:open_compose_window(command)
redraw
echo a:command
let res = system(a:command)
- new
+ split compose_message.txt
setlocal modifiable
- wincmd p
- close!
- 1,$delete
- put! =res
+ if winnr('$') > 1
+ wincmd p
+ close!
+ endif
+ silent 1,$delete
+ silent put! =res
call feedkeys("\<cr>")
call s:compose_window_mappings()
setlocal completefunc=CompleteContact
normal 1G
+ write!
endfunc
func! s:turn_into_compose_window()
call s:compose_window_mappings()
setlocal completefunc=CompleteContact