Skip to content

An error occurs if there is a newline in the dictionary of the Vim9 script loaded in the hooks_file. #507

@hokorobi

Description

@hokorobi

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:

  1. gvim.exe -N -u ~/vimfiles/vimrc-min-dein-hooks_file-vim9 -U NONE -i NONE
    See Minimal Config
  2. :call dein#recache_runtimepath()
  3. :quit
  4. gvim.exe -N -u ~/vimfiles/vimrc-min-dein-hooks_file-vim9 -U NONE -i NONE
  5. :set ft=vim
  6. input echo 'vim'
  7. :QuickRun
  8. Error occured
    See Screenshots. Errors encountered are displayed by :messages.

Expected behavior

No error.

Screenshots

If applicable, add screenshots to help explain your problem.

image

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: 6f40e08

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,
}
" }}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions