vim-patch:8.2.4934: string interpolation fails when not evaluating

Problem:    String interpolation fails when not evaluating.
Solution:   Skip the expression when not evaluating. (closes vim/vim#10398)

70c41241c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-04-15 18:19:47 +08:00
parent ef9af89da7
commit 29efd54e02
4 changed files with 15 additions and 16 deletions

View File

@@ -35,9 +35,7 @@ func Test_getscriptinfo()
source Xscript
let l = getscriptinfo()
call assert_match('Xscript$', l[-1].name)
" Nvim does not support interpolated strings yet.
" call assert_equal(g:loaded_script_id, $"<SNR>{l[-1].sid}_")
call assert_equal(g:loaded_script_id, '<SNR>' . l[-1].sid . '_')
call assert_equal(g:loaded_script_id, $"<SNR>{l[-1].sid}_")
call delete('Xscript')
endfunc