vscode-neovim: bug: vs code now constantly auto switching to the output panel on multiline messages
Check the following:
- I have checked the behavior after setting “vscode-neovim.neovimClean” in VSCode settings.
- I have read the vscode-neovim docs.
- I have searched existing issues.
Neovim version (nvim -v)
0.10.0
Operating system/version
MacOS 14.4
Describe the bug
In recent versions of this extension (> v1.13.1) the output panel gets focused whenever neovim outputs multiline messages. This behavior does not happen in v1.13.1, and is probably related to the “revamp messages output channel” PR (https://github.com/vscode-neovim/vscode-neovim/pull/2024) introduced in v1.14.
I use a neovim plugin (pounce) with this extension, and that plugin outputs multiline messages in the course of normal use, which has made this extension near unusable because it’s now constantly covering up the terminal window or otherwise refocusing things against my will.
VS code’s focusing behavior is quite aggressive and is not configurable (there are lot of longstanding issues about this in the vs code repo) so it would be nice to have a setting to disable this behavior in vscode-neovim
Related to: https://github.com/vscode-neovim/vscode-neovim/issues/2046 and https://github.com/vscode-neovim/vscode-neovim/issues/1812
Steps To Reproduce
- emit a multi-line message in neovim (
:echom "test\n"). - The ouput panel pops up, taking over focus from whatever was visible previously
Expected Behavior
The extension behaves the same as it did in v1.13.1 and shows multiline output in the status bar area rather than the output channel
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 19
1. Set
cmdheightto a higher value2. Use Nvim 0.10 and above versions because
cmdheightis unchangeable in Nvim 0.9Same but without any plugins, I’m getting very annoyed when doing a search that don’t exist like
/foobarand getting the vscode panel open with the messages:This is builtin and I would expect this to work without disrupting the UI and my current focus.
Could you please reopen and change back this behavior?
@mike-rambil, I’ve test now, and adding ‘:set cmdheight=10’ to my init file solved it for me. Did you try that?
As of
1.96:The statusbar can only show one line.
Proposal
It might be the case that we need to adjust a threshold so that the Output channel is only shown if there are >=2 EOL chars.
Thus this should not focus the Output channel:
but this should:
Does that mean there is a plan to fix that threshold?
Personally I don’t mind it showing it once (similar to debug opening the panel when started), but then I would like it to respect my decision to close the panel and stay closed for future messages if I choose not to read the messages, rather than continuing to open after being closed.
Messages should be displayed, but it should be the user’s choice to read them and not to have a panel automatically open. Many messages go into the output or sql console or debug console, but they don’t automatically open up the panel. I can choose to open the panel and read them if I desire.
Yes sorry about that, I was about to edit my post, the message panel opens but doesn’t actually steal focus.
The panel opening is still very annoying, as it takes a lot of UI space corresponding to the last time it was open. Imagine working on in vscode’s terminal with a maximized panel, then toggling it to go back on code, search foobar: now the panel opens, maximized, hiding everything I was doing 🥲
About your proposition, I’d much prefer avoiding the panel to open in all cases due to un-necessary UI disturbance, if there are multiple lines there could be a note in the statusline saying there are more lines with a way to open the messages panel 🤔 The current behavior could be a setting, but having something like this enabled by default feels like bad UX with the not-uncommon maximized panel case I just described.