dein.vim
dein.vim copied to clipboard
An error occurs if there is a newline in the dictionary of the Vim9 script loaded in the hooks_file.
Description
An error occurs if there is a newline in the dictionary of the Vim9 script loaded in the hooks_file. Code of Cause in Minimal Config:
g:quickrun_config._ = {
'runner': 'job',
'outputter': 'buffer',
'outputter/buffer/close_on_empty': 1,
}
To Reproduce
Steps to reproduce the behavior:
- gvim.exe -N -u ~/vimfiles/vimrc-min-dein-hooks_file-vim9 -U NONE -i NONE See Minimal Config
-
:call dein#recache_runtimepath()
-
:quit
- gvim.exe -N -u ~/vimfiles/vimrc-min-dein-hooks_file-vim9 -U NONE -i NONE
-
:set ft=vim
- input
echo 'vim'
-
:QuickRun
- Error occured
See Screenshots. Errors encountered are displayed by
:messages
.
Expected behavior
No error.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop:
Please complete the following information, when reporting bugs related to the Dein.vim.
- OS: Windows11
- Vim or Neovim version: Vim 9.0.1491
- Commit/Version: 6f40e084
Minimal Config
~/vimfiles/vimrc-min-dein-hooks_file-vim9
set nocompatible
set runtimepath+=C:\Users\hokorobi\_vim\dein\repos\github.com\Shougo\dein.vim
let g:testdic = {}
if dein#min#load_state(expand('~/_vim/dein'))
call dein#begin('~/_vim/dein')
call dein#add('thinca/vim-quickrun', #{
\ on_cmd: 'QuickRun',
\ hooks_file: '~/vimfiles/vimrc-min-dein-hooks_file-vim9_quickrun.vim',
\ })
call dein#end()
call dein#save_state()
endif
filetype plugin indent on
syntax enable
~/vimfiles/vimrc-min-dein-hooks_file-vim9_quickrun.vim
" hook_source {{{
vim9script
g:quickrun_config = get(g:, 'quickrun_config', {})
g:quickrun_config._ = {
'runner': 'job',
'outputter': 'buffer',
'outputter/buffer/close_on_empty': 1,
}
" }}}
OH no.
https://github.com/vim/vim/pull/12269 is needed.
https://github.com/vim/vim/pull/12269 works. Please test.
Thank you! I will try to use it when PR is merged.