-
-
Notifications
You must be signed in to change notification settings - Fork 960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(util): suppress 'press ENTER' in echo_messages() #1668
Conversation
This is used for workspace/showMessage, when it contains multiple lines. Using `echomsg` in a loop means that each line after the second prompts before displaying. The downside of this change is if there are multiple consecutive calls to echo_messages(), only the last one is shown. (All will appear in :messages) Motivating use case: clangd has "dump AST" code action behind the -hidden-features flag. This action calls showMessage with a payload like: ``` FunctionDecl 0x14387ee101e8 </home/sammccall/test.cc:1:1, line:3:1> line:1:6 foo 'void ()' `-CompoundStmt 0x14387ee10380 <col:11, line:3:1> `-DeclStmt 0x14387ee10368 <line:2:3, col:10> `-VarDecl 0x14387ee10300 <col:3, col:7> col:7 bar 'int' ```
I can't reproduce 'press ENTER' behavior, we use |
@chemzqm What did you try? Running This should do it though:
This patch still does that, it uses echom to send the message to |
doesn't reproduce |
You're right, sorry was AFK. let me get a proper reproducer. |
OK, so far the only way I've been able to reproduce this is with an actual language server sending a multiline e.g. with
The patch definitely fixes this for vim 8.1.2269. It seems I should be able to create the same effect by calling |
@sam-mccall no |
@fannheyward Indeed, I got nvim set up and verified it's broken in a different way than vim :-)
(Both with an empty config other than coc.nvim, coc-clangd, coc-settings.json as described above, and |
Reproduced, I prefer to add this patch. @chemzqm in this case, |
Thanks! |
This is used for workspace/showMessage, when it contains multiple lines.
Using
echomsg
in a loop means that each line after the second promptsbefore displaying.
The downside of this change is if there are multiple consecutive calls
to
echo_messages()
, only the last one is shown. (All will appear in :messages)Motivating use: clangd has "dump AST" code action behind the
-hidden-features flag. This action calls showMessage with a payload like: