Skip to content

Commit 732cc21

Browse files
committed
Bug fix for xolox#misc#open#url() on Mac OS X (xolox/vim-shell#18)
Related to vim-shell issue #18: xolox/vim-shell#18
1 parent aea5599 commit 732cc21

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ from the source code of the miscellaneous scripts using the Python module
3838
<!-- Start of generated documentation -->
3939

4040
The documentation of the 68 functions below was extracted from
41-
15 Vim scripts on June 19, 2013 at 21:05.
41+
15 Vim scripts on June 19, 2013 at 22:53.
4242

4343
### Handling of special buffers
4444

autoload/xolox/misc.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
" Last Change: June 19, 2013
55
" URL: http://peterodding.com/code/vim/misc/
66

7-
let g:xolox#misc#version = '1.6.2'
7+
let g:xolox#misc#version = '1.6.3'

autoload/xolox/misc/open.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ function! xolox#misc#open#url(url) " {{{1
6767
let url = 'mailto:' . url
6868
endif
6969
endif
70-
if has('unix') && !has('gui_running') && $DISPLAY == ''
70+
let on_unix = has('unix')
71+
let not_on_mac = !xolox#misc#os#is_mac()
72+
let no_gui_available = (has('gui_running') == 0 && $DISPLAY == '')
73+
if on_unix && not_on_mac && no_gui_available
7174
call xolox#misc#msg#debug("vim-misc %s: Using command line web browser because no GUI seems to be available ..", g:xolox#misc#version)
7275
for browser in ['lynx', 'links', 'w3m']
7376
call xolox#misc#msg#debug("vim-misc %s: Checking whether %s command line web browser is installed ..", g:xolox#misc#version, string(browser))

doc/misc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ from the source code of the miscellaneous scripts using the Python module
138138
'vimdoctool.py' included in vim-tools [5].
139139

140140
The documentation of the 68 functions below was extracted from 15 Vim scripts
141-
on June 19, 2013 at 21:05.
141+
on June 19, 2013 at 22:53.
142142

143143
-------------------------------------------------------------------------------
144144
*misc-handling-of-special-buffers*

0 commit comments

Comments
 (0)