Neovim-qt: Printing v:errmsg on attach is interfering with plugins that run at VimEnter

Created on 9 Jan 2019  路  4Comments  路  Source: equalsraf/neovim-qt

Hi,

assume this minimal vimrc:

autocmd VimEnter * silent! xxx

Usually, a manual :silent! xxx will simply output nothing, for obvious reasons. But during startup/VimEnter, using the vimrc from above, you'll get the message:

E492: Not an editor command: silent! xxx

It also gets logged to the message history: :messages

Bug? FWIW, this doesn't happen with nvim alone.

(For testing I used nvim-qt.app master and nvim master.)

Most helpful comment

Reverted in master. Thanks @mhinz.

All 4 comments

Culprit: https://github.com/equalsraf/neovim-qt/commit/badc90ee32b5a973c3aa07ee3e4046da6bf09325

What's the intention behind that commit?

It kind of interferes with every plugin that runs on VimEnter (since :silent! is quite common to silence unimportant errors). :)

That commit was a workaround for https://github.com/equalsraf/neovim-qt/pull/463 , but it's no longer necessary with Nvim 0.3.2 --embed behavior.

Half-related note: for any arbitrary string UTF-8 should be used, not err.toLatin1() as in that commit. Error messages can be translated... (the other cases in the codebase is ASCII generated strings, but one could consider changing them for the risk of being naively copied to a case where it matters).

Reverted in master. Thanks @mhinz.

Was this page helpful?
0 / 5 - 0 ratings