vmail 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +1 -1
- data/lib/vmail.vim +3 -0
- data/lib/vmail/imap_client.rb +4 -3
- data/lib/vmail/version.rb +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -359,7 +359,7 @@ Here are some example search queries.
|
|
359
359
|
body "unix philosophy"
|
360
360
|
|
361
361
|
# example of date range and multiple conditions
|
362
|
-
before 30-
|
362
|
+
before 30-nov-2010 since 1-nov-2010 from prx.org
|
363
363
|
|
364
364
|
Tip: When you're entering your search query, `<C-u>` clears the query line.
|
365
365
|
|
data/lib/vmail.vim
CHANGED
@@ -88,6 +88,9 @@ function! s:show_message(stay_in_message_list)
|
|
88
88
|
redraw
|
89
89
|
" substract 2: because lines numbers start at 1 & messages start at line 2
|
90
90
|
let s:current_message_index = line('.') - 2
|
91
|
+
if s:current_message_index < 0
|
92
|
+
return
|
93
|
+
endif
|
91
94
|
let command = s:show_message_command . s:current_message_index
|
92
95
|
echom "Loading message. Please wait..."
|
93
96
|
redrawstatus
|
data/lib/vmail/imap_client.rb
CHANGED
@@ -270,7 +270,7 @@ module Vmail
|
|
270
270
|
log "@all_search #{@all_search}"
|
271
271
|
@query = query
|
272
272
|
log "search query: #{@query.inspect}"
|
273
|
-
@ids = reconnect_if_necessary do
|
273
|
+
@ids = reconnect_if_necessary(180) do # increase timeout to 3 minutes
|
274
274
|
@imap.search(@query.join(' '))
|
275
275
|
end
|
276
276
|
# save ids in @ids, because filtered search relies on it
|
@@ -341,17 +341,18 @@ module Vmail
|
|
341
341
|
end
|
342
342
|
remaining = start_id - 1
|
343
343
|
else # filter search
|
344
|
-
remaining = @ids.index(start_id) - 1
|
344
|
+
remaining = (@ids.index(start_id) || 1) - 1
|
345
345
|
end
|
346
346
|
if remaining < 1
|
347
347
|
log "none remaining"
|
348
|
-
return res
|
348
|
+
return "showing all matches\n" + res
|
349
349
|
end
|
350
350
|
log "remaining messages: #{remaining}"
|
351
351
|
"> Load #{[100, remaining].min} more messages. #{remaining} remaining.\n" + res
|
352
352
|
end
|
353
353
|
|
354
354
|
def show_message(index, raw=false)
|
355
|
+
return if index.to_i < 0
|
355
356
|
log "showing message at #{index}"
|
356
357
|
return @current_mail.to_s if raw
|
357
358
|
index = index.to_i
|
data/lib/vmail/version.rb
CHANGED