summaryrefslogtreecommitdiffstats
path: root/src/testdir/shared.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-04 20:34:19 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-04 20:34:19 +0200
commit9d954207e2cc807b475bb04f8b59ef5bb3772d99 (patch)
tree1cc786e3355baa912671ab3b54ae8da5de43ae8b /src/testdir/shared.vim
parente88fc7a574263fd399c6815378bcd8fd228d8b54 (diff)
patch 8.0.1053: setline() does not work on startupv8.0.1053
Problem: setline() does not work on startup. (Manuel Ortega) Solution: Do not check for ml_mfp to be set for the current buffer. (Christian Brabandt)
Diffstat (limited to 'src/testdir/shared.vim')
-rw-r--r--src/testdir/shared.vim14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index a305c90cb6..691199a97c 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -166,15 +166,21 @@ func s:feedkeys(timer)
endfunc
" Get the command to run Vim, with -u NONE and --not-a-term arguments.
+" If there is an argument use it instead of "NONE".
" Returns an empty string on error.
-func GetVimCommand()
+func GetVimCommand(...)
if !filereadable('vimcmd')
return ''
endif
+ if a:0 == 0
+ let name = 'NONE'
+ else
+ let name = a:1
+ endif
let cmd = readfile('vimcmd')[0]
- let cmd = substitute(cmd, '-u \f\+', '-u NONE', '')
- if cmd !~ '-u NONE'
- let cmd = cmd . ' -u NONE'
+ let cmd = substitute(cmd, '-u \f\+', '-u ' . name, '')
+ if cmd !~ '-u '. name
+ let cmd = cmd . ' -u ' . name
endif
let cmd .= ' --not-a-term'
let cmd = substitute(cmd, 'VIMRUNTIME=.*VIMRUNTIME;', '', '')