summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_extui
AgeCommit message (Collapse)AuthorFiles
2025-05-13fix(extui): adjust which messages are sent to "more" windowLuuk van Baal1
Problem: Decision whether message is sent to "more" window is based on the number of newlines present in a message, rather than the actual text height. With the "box" target, messages that come from a cmdline entered command are not always routed to the more window. Solution: Still write the message to the target buffer, and calculate the actual text height. Postpone updating several state variables until after the decision to re-route is made. With the "box" target, only consider the text height of the message if it is not a message from a cmdline entered command.
2025-05-13feat(extui): show "g<" hint when message spills 'cmdheight'Luuk van Baal1
Problem: Extui shows a spill indicator to hint to the user to press "g<" to show the output of the last command. The user may be unaware of this mapping. Solution: Route a hint message to the message "box" window.
2025-05-09fix(extui): close cmdwin to enter "more" window (#33860)luukvbaal1
Problem: Cannot enter "more" window while cmdwin is open since it is a regular window and changing windows is disallowed. Solution: Close cmdwin to enter the "more" window. Minor regression w.r.t. the current message grid. Resolving that will require somehow bypassing textlock for the "more" window.
2025-05-09feat(extui): assign 'filetype' to extui windows (#33924)luukvbaal1
Problem: Unable to discern windows used by the extui interface to configure their local options. 'winblend' may be detrimental to legibility depending on the colorscheme and 'background'. Solution: Assign the "cmdline", "msgmore", "msgprompt" and "msgbox" 'filetype' to the respective windows. Don't set 'winblend' for the message "box" window.
2025-05-09fix(extui): route interactive messages to more-window (#33885)luukvbaal2
Problem: Extui does not route messages emitted as a result of a typed command to the "more" window. Command message leading shell messages is missing a kind. Messages not routed to 'cmdheight' area after it was 0. Solution: Route messages that were emitted in the same event loop as an entered command to the "more" window. Also append multiple messages in an already open more-window. Assign it the `shell_cmd` kind. Change message position when 'cmdheight' changes from 0.
2025-05-07fix(extui): "box" window width calculated on last line (#33881)luukvbaal1
Problem: The "box" window width is calculated on the last line when applying "last" virt_text. There may be longer lines part of the same message. Solution: Don't decrease box width if the calculated width is smaller. Minor unrelated changes. Co-authored-by: Eike <eike.rackwitz@mail.de>
2025-05-05fix(extui): drop "more" window that is no longer floating #33861luukvbaal1
Problem: Moving the "more" (or any extui)-window to a split with `wincmd L` does not invalidate it as a tracked window. Solution: Drop an extui window that is no longer floating.
2025-05-04fix(extui): message may overwrite active cmdline #33846luukvbaal2
Problem: Active cmdline may be overwritten by a message. Solution: Check if cmdline is active before writing message.
2025-05-04fix(extui): hide inactive "more" window (#33831)luukvbaal1
Problem: More-window is left visible after leaving it. Cursor may be hidden behind it and it is hard to re-enter afterwards. Solution: Close the more-window when another window is entered.
2025-05-03fix(extui): search highlighting in extui "more" pager #33792luukvbaal1
Problem: No search highlighting in extui "more" pager window. Solution: Only use custom highlight namespace in cmdline window.
2025-05-02fix(extui): cmdline visibility, cmdheight cursor position (#33774)luukvbaal3
Problem: The cmdline popupmenu is hidden behind extui windows. 'showmode' message is drawn over the cmdline. Changing the 'cmdheight' to accommodate space for the text in the cmdline may change the current cursor position. Solution: Ensure kZIndexMessages < zindex < kZIndexCmdlinePopupMenu. Clear the 'showmode' message when the cmdline level is negative. Temporarily set 'splitkeep' = "screen" when changing the 'cmdheight'.
2025-05-02fix(extui): close message window with `q`Christian Clason1
Problem: Using `<c-c>` does not follow precedent (from `checkhealth` etc.) for closing "information windows". Solution: Use `q` for close mapping.
2025-05-02feat(ui): ext_cmdline/messages for the TUI #27855luukvbaal3
Problem: We have an unmaintained Vimscript parser and cmdline highlighting mechanism, with which it is hard to leverage the treesitter highlighter. Long messages result in a hit-enter-prompt. Solution: Implement a vim.ui_attach() UI, that replaces the message grid (orphaning some 3000+ LOC core C code). Introduce an experimental vim._extui module, because removing the message grid at the same time is too risky. The new UI leverages the bundled treesitter highlighter and parser for Vimscript, as well as the matchparen plugin, to highlight the cmdline. Messages are truncated in the cmdline area, or placed in a floating message box in the bottom right corner. Special ("list_cmd") messages and the message history are shown in a, "more prompt" (now a fully interactive regular window). Various default UI elements ('showcmd', 'ruler') are also placed in the cmdline area, as virtual text. `require('vim._extui').enable({})` enables the experimental UI. `{ msg.pos = 'box' }` or `:set cmdheight=0` enables the message box variant. Followup: - Come to a consensus for how best to represent messages (by default). - Start removing message grid when this is deemed a successful replacement. When that is finished, make this new UI the default and update a lot of tests.