vmail 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -686,12 +686,13 @@ endfunc
686
686
  " maybe not DRY enough, but fix that later
687
687
  " also, come up with a more precise regex pattern for matching hyperlinks
688
688
  func! s:open_href(all) range
689
+ let pattern = 'https\?:[^\s>)\]]\+'
689
690
  let n = 0
690
691
  " range version
691
692
  if a:firstline < a:lastline
692
693
  let lnum = a:firstline
693
694
  while lnum <= a:lastline
694
- let href = matchstr(getline(lnum), 'https\?:\S\+')
695
+ let href = matchstr(getline(lnum), pattern)
695
696
  if href != ""
696
697
  let command = s:browser_command . " '" . href . "' &"
697
698
  call system(command)
@@ -702,10 +703,10 @@ func! s:open_href(all) range
702
703
  echom 'opened '.n.' links'
703
704
  return
704
705
  end
705
- let line = search('https\?:', 'cw')
706
+ let line = search(pattern, 'cw')
706
707
  if line && a:all
707
708
  while line
708
- let href = matchstr(getline(line('.')), 'https\?:\S\+')
709
+ let href = matchstr(getline(line('.')), pattern)
709
710
  let command = s:browser_command . " '" . href . "' &"
710
711
  call system(command)
711
712
  let n += 1
@@ -713,7 +714,7 @@ func! s:open_href(all) range
713
714
  endwhile
714
715
  echom 'opened '.n.' links'
715
716
  else
716
- let href = matchstr(getline(line('.')), 'https\?:\S\+')
717
+ let href = matchstr(getline(line('.')), pattern)
717
718
  let command = s:browser_command . " '" . href . "' &"
718
719
  call system(command)
719
720
  echom 'opened '.href
@@ -68,7 +68,7 @@ module Vmail
68
68
  return
69
69
  end
70
70
  log "selecting mailbox #{mailbox.inspect}"
71
- reconnect_if_necessary do
71
+ reconnect_if_necessary(15) do
72
72
  log @imap.select(mailbox)
73
73
  end
74
74
  log "done"
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 0
9
- version: 0.9.0
8
+ - 1
9
+ version: 0.9.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi