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.
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.
Problem: If the only highlight present in the buffer is an extmark, and its end
position is outside the screen, redraws that start on lines after the
first line of the mark will consider the buffer as not having any highlights,
and skip drawing the mark's highlight.
Solution: Check the updated number of decor ranges.
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.
Problem: Currently, 'smartcase' is respected when completing keywords
using <C-N>, <C-P>, <C-X><C-N>, and <C-X><C-P>. However, when
a user continues typing and the completion menu is filtered
using cached matches, 'smartcase' is not applied. This leads
to poor-quality or irrelevant completion suggestions, as shown
in the example below.
Solution: When filtering cached completion items after typing additional
characters, apply case-sensitive comparison if 'smartcase' is
enabled and the typed pattern includes uppercase characters.
This ensures consistent and expected completion behavior.
(Girish Palya)
closes: vim/vim#17271dc314053e1
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: Flag checking logic uses a temporary variable and multiple
bitwise operations in insexpand.c
Solution: Consolidate into a single equality check using bitwise OR and
comparison (glepnir)
closes: vim/vim#17276c3fbaa086e
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: Messages that are already added to the history are not emitted
as part of the "g<" msg_history_show event.
Solution: Move clearing the history for temporary messages to before
adding a message to the history, rather than after emitting
a message.
Problem: nil error possible if a loaded buffer hasn't been drawn in a window:
```vim
lua vim.lsp.document_color.is_enabled() -- Load module
badd foo
call bufload('foo')
colo default
```
Solution: Skip _buf_refresh branch also if bufstates[bufnr] is nil.
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>
Ignore single-quoted backslash escape sequences in parameter expansions.
\' is not an escaped single quote in ${foo:-'word\'}.
closes: vim/vim#17261fe22867ef5
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: conceal_lines cache is invalidated in `on_buf`
which is too late for code calculating text height after a
buffer change but before a redraw (like `lsp/util.lua`).
Solution: Replace `on_buf` with `on_bytes` handler that invalidates
the cache and clears the marks.
Problem:
decorations_spec.lua, float_spec.lua, multigrid_spec.lua are not
auto-formatted.
Solution:
Add a special `formatlua2` cmake target, which invokes `stylua` with
an alternative `.stylua2.toml` config.
Problem:
termkey crashes due to an out-of-bounds write in an array when it
received a CSI sequence with 17 or more arguments. This could be
observed on startup with certain terminal emulators like [RLogin], which
send a response to the `CSI c` query containing 17 parameters.
The termkey code has a boundary check, but its comparison operator is
incorrect.
Solution:
Correct the comparison operator to ensure proper boundary checking.
With this change, I have confirmed that the crash no longer occurs on
RLogin. https://github.com/kmiya-culti/RLoginFixes#24356
This commit will eliminate flicker while editing one open window. It
works by querying previously calculated trees for highlight marks, in
the case that we are still asynchronously parsing in `on_win`.
It will not fully solve the case of flicker when there are multiple open
windows, since the parser will drop previously parsed injection trees
whenever it receives a call to parse a different region of the buffer.
This will require a refactor of `languagetree.lua`.
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.
Problem: Missing kind and separate event for each line for message
containing buffer lines for e.g. `:print`.
Solution: Set the `list_cmd` kind and only `msg_start()` for the first
message, print a newline instead.
Problem:
Stopping a language server and then calling vim.lsp.start() with the same name/root will return the old language server that's in the middle of shutting down. vim.lsp.start() won't return a new server until the old process has terminated.
Solution:
Introducing a client._is_stopping field that tracks the shutdown phase, preventing the client from being reused.
Problem:
assert_log() only matches single lines. This was never an intentional
decision, it was merely a result of using read_file_list().
Note: any tests that indiscriminately match `.*` should be rewritten to
avoid (unlikely) "false positives". I checked all existing tests.
Solution:
Change assert_log() to match the concatenated lines instead of matching
per-line.