fix(messages): reset redirection message column at message start #38068

Problem:  Leading message newlines (not emitted with ext_messages since
          4260f73) were responsible for resetting the redirection message
          column (while the newline itself is later pruned...).
Solution: Ensure the redirection column is reset at the start of a message.
          (Instead of re-adjusting all the newline callsites which can
          themselves hopefully be pruned if ext_messages is enabled by
          default.)
This commit is contained in:
luukvbaal
2026-02-26 13:45:33 +01:00
committed by GitHub
parent 8f1c161d9d
commit e63346dfe9
2 changed files with 19 additions and 7 deletions

View File

@@ -439,6 +439,12 @@ describe('API', function()
assert_alive()
eq(false, exec_lua('return _G.success'))
end)
it('redir_write() message column is reset with ext_messages', function()
exec_lua('vim.ui_attach(1, { ext_messages = true }, function() end)')
api.nvim_exec2('hi VisualNC', { output = true })
eq('VisualNC xxx cleared', api.nvim_exec2('hi VisualNC', { output = true }).output)
end)
end)
describe('nvim_command', function()