vmail 0.9.0 → 0.9.1
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/lib/vmail.vim +5 -4
- data/lib/vmail/imap_client.rb +1 -1
- data/lib/vmail/version.rb +1 -1
- metadata +2 -2
data/lib/vmail.vim
CHANGED
@@ -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),
|
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(
|
706
|
+
let line = search(pattern, 'cw')
|
706
707
|
if line && a:all
|
707
708
|
while line
|
708
|
-
let href = matchstr(getline(line('.')),
|
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('.')),
|
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
|
data/lib/vmail/imap_client.rb
CHANGED
data/lib/vmail/version.rb
CHANGED