mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 07:11:20 +00:00
vim-patch:8.2.4594: need to write script to a file to be able to source them
Problem: Need to write script to a file to be able to source them.
Solution: Make ":source" use lines from the current buffer. (Yegappan
Lakshmanan et al., closes vim/vim#9967)
36a5b6867b
Most code and test changes are reverted or modified again in patch
8.2.4603, so only port parts that are untouched in patch 8.2.4603.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -92,6 +92,12 @@ func Test_source_error()
|
||||
call assert_fails('scriptencoding utf-8', 'E167:')
|
||||
call assert_fails('finish', 'E168:')
|
||||
" call assert_fails('scriptversion 2', 'E984:')
|
||||
call assert_fails('source!', 'E471:')
|
||||
new
|
||||
call setline(1, ['', '', '', ''])
|
||||
call assert_fails('1,3source Xscript.vim', 'E481:')
|
||||
call assert_fails('1,3source! Xscript.vim', 'E481:')
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" Test for sourcing a script recursively
|
||||
|
||||
Reference in New Issue
Block a user