fix(ui): only internal messages are unsafe #37462

Problem:  Fast context for msg_show event inhibits vim.ui_attach from
          displaying a stream of messages from a single command.

Solution: Remove fast context from msg_show events emitted as a result
          of explicit API/command calls. The fast context was originally
          introduced to prevent issues with internal messages.
This commit is contained in:
luukvbaal
2026-01-27 00:18:51 +01:00
committed by GitHub
parent e9d03b92b6
commit d30d91f3a4
12 changed files with 215 additions and 140 deletions

View File

@@ -64,7 +64,14 @@ describe('cmdline2', function()
{16::}{15:if} {26:1} |
{16::} ^ |
]])
feed('echo "foo"<CR>')
feed('echo "foo"')
screen:expect([[
|
{1:~ }|*11
{16::}{15:if} {26:1} |
{16::} {15:echo} {26:"foo"}^ |
]])
feed('<CR>')
screen:expect([[
|
{1:~ }|*9
@@ -73,13 +80,52 @@ describe('cmdline2', function()
{15:foo} |
{16::} ^ |
]])
feed('endif')
feed([[echo input("foo\nbar:")<CR>]])
screen:expect([[
|
{1:~ }|*9
{1:~ }|*7
:if 1 |
: echo "foo" |
foo |
: echo input("foo\nbar:") |
foo |
bar:^ |
]])
feed('baz')
screen:expect([[
|
{1:~ }|*7
:if 1 |
: echo "foo" |
foo |
: echo input("foo\nbar:") |
foo |
bar:baz^ |
]])
feed('<CR>')
screen:expect([[
|
{1:~ }|*5
{16::}{15:if} {26:1} |
{16::} {15:echo} {26:"foo"} |
{15:foo} |
{16::} {15:echo} {25:input}{16:(}{26:"foo\nbar:"}{16:)} |
{15:foo} |
{15:bar}:baz |
{15:baz} |
{16::} ^ |
]])
feed('endif')
screen:expect([[
|
{1:~ }|*5
{16::}{15:if} {26:1} |
{16::} {15:echo} {26:"foo"} |
{15:foo} |
{16::} {15:echo} {25:input}{16:(}{26:"foo\nbar:"}{16:)} |
{15:foo} |
{15:bar}:baz |
{15:baz} |
{16::} {15:endif}^ |
]])
feed('<CR>')