Skip to content

Commit 0628e2e

Browse files
author
Pete Johns
committed
Check for full matches for commands
1 parent aa20597 commit 0628e2e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

autoload/rails.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ function! s:app_start_rails_command(cmd, ...) dict abort
915915
\ }, title, title)
916916
call s:push_chdir(1)
917917
try
918-
if exists(':Start')
918+
if exists(':Start') == 2
919919
exe 'Start'.(a:0 && a:1 ? '!' : '').' -title=rails\ '.title.' '.cmd
920920
elseif has("win32")
921921
exe "!start ".cmd
@@ -1013,7 +1013,7 @@ function! s:Log(bang,arg)
10131013
exe "cgetfile ".lf
10141014
clast
10151015
else
1016-
if exists(":Tail")
1016+
if exists(":Tail") == 2
10171017
Tail `=rails#app().path(lf)`
10181018
else
10191019
pedit `=rails#app().path(lf)`
@@ -1418,7 +1418,7 @@ call s:add_methods('readable', ['test_file_candidates', 'test_file', 'default_ra
14181418
" Preview {{{1
14191419

14201420
function! s:initOpenURL()
1421-
if !exists(":OpenURL")
1421+
if !exists(":OpenURL") == 2
14221422
if has("gui_mac") || has("gui_macvim") || exists("$SECURITYSESSIONID")
14231423
command -bar -nargs=1 OpenURL :!open <args>
14241424
elseif has("gui_win32")
@@ -1538,7 +1538,7 @@ function! s:Preview(bang, lnum, uri) abort
15381538
let uri = 'http://'.binding.'/'.s:sub(uri,'^/','')
15391539
endif
15401540
call s:initOpenURL()
1541-
if exists(':OpenURL') && !a:bang
1541+
if (exists(':OpenURL') == 2) && !a:bang
15421542
exe 'OpenURL '.uri
15431543
else
15441544
" Work around bug where URLs ending in / get handled as FTP
@@ -1763,7 +1763,7 @@ function! s:app_server_command(bang,arg) dict
17631763
return
17641764
endif
17651765
endif
1766-
if exists(':Start') || has('win32')
1766+
if (exists(':Start') == 2) || has('win32')
17671767
call self.start_rails_command('server '.a:arg, 1)
17681768
else
17691769
call self.execute_rails_command('server '.a:arg.' -d')
@@ -4475,7 +4475,7 @@ function! s:BufSettings()
44754475
call self.setvar('surround_69', "\1expr: \1\rend")
44764476
call self.setvar('surround_101', "\r\nend")
44774477
endif
4478-
if exists(':UltiSnipsAddFiletypes')
4478+
if exists(':UltiSnipsAddFiletypes') == 2
44794479
UltiSnipsAddFiletypes rails
44804480
endif
44814481
elseif ft =~# 'yaml\>' || fnamemodify(self.name(),':e') ==# 'yml'

0 commit comments

Comments
 (0)