vmail 1.7.4 → 1.7.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -224,13 +224,14 @@ function! s:update()
224
224
  let command = s:update_command
225
225
  echo "Checking for new messages. Please wait..."
226
226
  let res = system(command)
227
- if len(split(res, "\n", '')) > 0
227
+ let lines = split(res, '\n')
228
+ if len(lines) > 0
228
229
  setlocal modifiable
229
- call append(0, res)
230
+ normal gg
231
+ call append(0, lines)
230
232
  setlocal nomodifiable
231
233
  write!
232
- let num = len(split(res, '\n', ''))
233
- call cursor(0, 0)
234
+ let num = len(lines)
234
235
  redraw
235
236
  echom "You have " . num . " new message" . (num == 1 ? '' : 's') . "!"
236
237
  else
@@ -216,7 +216,7 @@ module Vmail
216
216
  res = get_message_headers(message_ids.reverse)
217
217
  res
218
218
  else
219
- nil
219
+ ''
220
220
  end
221
221
  rescue
222
222
  log $!
@@ -9,7 +9,8 @@ module Vmail
9
9
  end
10
10
  m
11
11
  }
12
- messages.map {|m| format_header_for_list(m)}.join("\n")
12
+ res = messages.map {|m| format_header_for_list(m)}.join("\n")
13
+ res
13
14
  end
14
15
 
15
16
  def fetch_and_cache_headers(id_set)
@@ -18,7 +18,8 @@ module Vmail
18
18
  end
19
19
 
20
20
  def show_message(message_id, raw=false)
21
- log "Show message: #{message_id}"
21
+ message_id = message_id.strip.gsub('\\', '')
22
+ log "Show message: #{message_id.inspect}"
22
23
  return current_message.rfc822 if raw
23
24
  log "Showing message message_id: #{message_id}"
24
25
  res = fetch_and_cache(message_id)
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '1.7.4'
2
+ VERSION = '1.7.5'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vmail
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.7.4
5
+ version: 1.7.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi