Weird error messages never happened before
markwu opened this issue · 6 comments
markwu commented
Weird error messages never happened before.
Messages maintainer: Bram Moolenaar <Bram@vim.org>
Error detected while processing BufEnter Autocommands for "*":
Vim(mksession):E11: Invalid in command-line window; <CR> executes, CTRL-C quits: mksession! /Users/mark/.vim/sessions/\%Users\%mark\%.dot_vim.vim
Press ENTER or type command to continue
reproduce steps
- vim -u NONE
q:
to open command line window- type
:mksession
to make a session
my platform
macOS 10.14.6
head version of vim, neovim, macvim
markwu commented
It seems I have to disable s:persist()
when enter buffer with
let g:obsession_no_bufenter = 1
to avoid this error.
markwu commented
Seems no way to identify command line window, I just use silent avoid those error messages.
autocmd BufEnter *
\ if !get(g:, 'obsession_no_bufenter') |
\ silent! exe s:persist() |
\ endif
mvanderkamp commented
Deleted my comments since I'm a dolt- silent! should work fine.
markwu commented
I tested it, but still get the same error messages.
tpope commented
I thought I tested it too but I guess not. Looks like 'buftype'
hasn't been set yet. God, why is this so stupid.
markwu commented
Thanks, I confirmed it fixed.