Problem: ComplMatchIns doesn't work after multibyte chars
(after v9.1.0936)
Solution: Use (ptr - line) instead of wlv.col (zeertzjq).
closes: vim/vim#16233f4ccada5c3
When a terminal application running inside the terminal emulator sets
the cursor shape or blink status of the cursor, update the cursor in the
parent terminal to match.
This removes the "virtual cursor" that has been in use by the terminal
emulator since the beginning. The original rationale for using the
virtual cursor was to avoid having to support additional UI methods to
change the cursor color for other (non-TUI) UIs, instead relying on the
TermCursor and TermCursorNC highlight groups.
The TermCursor highlight group is now used in the default 'guicursor'
value, which has a new entry for Terminal mode. However, the
TermCursorNC highlight group is no longer supported: since terminal
windows now use the real cursor, when the window is not focused there is
no cursor displayed in the window at all, so there is nothing to
highlight. Users can still use the StatusLineTermNC highlight group to
differentiate non-focused terminal windows.
BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.
Problem: hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)
Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.
`:pbuffer` can also open special buffer, for example terminal buffer.
closes: vim/vim#16222a2a2fe841e
Cherry-pick Test_popup_and_previewwindow_dump() changes from patch
9.0.0625.
Cherry-pick Run_noroom_for_newwindow_test() changes from patches
8.2.0432 and 9.0.0363.
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Problem:
Since e049c6e4c0, most statusline-like UI elements can combine
highlight attrs, except for sign/statuscolumn.
Solution:
Implement for sign/statuscolumn.
Problem: Float preview window still exist when back at original.
Or no info item is selected.
Solution: if selected is -1 or no info is selected, if float preview
window exist close it first.
- Problem: cannot replace the initial bufwrite message (from `filemess`) by the final one (`"test.lua" [New] 0L, 0B written`), when using `vim.ui_attach`.
- Solution: add kind to both messages.
Problem: :sleep! not hiding the cursor is an arbitrary difference from
Vim without obvious justification, and Vim's behavior isn't
easily achievable in Nvim.
Solution: Make :sleep! hide the cursor while sleeping.
Ref:
6a01b3fcc3b5c0ade437
Problem: Hit double grid_line_start() assert when redrawing from
ext_messages msg_ruler event.
Solution: Do not start() batched grid calls when win_redr_ruler() will not
puts() anything.
Problem: Separate message emitted for each newline present in Lua
print() arguments.
Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use
msg_multiline(). Refactor vim.print() to use print().
Problem: Floating windows with focusable set to false can reasonably be
expected to be UI elements but are listed in some outputs that
should contain only regular windows.
Solution: Hide unfocusable floating windows from the default tabline and
:tabs.
Before calling "attach" a screen object is just a dummy container for
(row, col) values whose purpose is to be sent as part of the "attach"
function call anyway.
Just create the screen in an attached state directly. Keep the complete
(row, col, options) config together. It is still completely valid to
later detach and re-attach as needed, including to another session.
Problem: Ext_messages chunks only contain the highlight attr id, which
is not very useful for vim.ui_attach() consumers.
Solotion: Add highlight group id to message chunks, which can easily be
used to highlight text in the TUI through nvim_buf_set_extmark():
hl_group = synIDattr(id, "name").
Problem: Highlight group id is not propagated to the end of the message call
stack, where ext_messages are emitted.
Solution: Refactor message functions to pass along highlight group id
instead of attr id.
Problem: Inccommand preview callback may flush inaccurate cmdline cursor position.
Solution: Ensure cursor is where it belongs when doing command preview.
Problem: Can receive dozens of <MouseMove> events for same cell position. #30965
Solution: Leverage check_multiclick() to detect if cell position is unchanged.
Problem: using wrong highlight group for spaces for popupmenu
Solution: use original attribute instead of combined attributed
(glepnir)
closes: vim/vim#15978bc10be7a40
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: topline might be changed in diff mode unexpectedly
(Jaehwang Jung)
Solution: do not re-calculate topline, when using line() func
in diff mode.
fixes: vim/vim#15812closes: vim/vim#1595005a40e07c2
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Selecting an item in the right-click menu when clicking to the
left/right of it is confusing, especially in a UI that doesn't
support 'mousemoveevent'.
Solution: Don't select an item when clicking to the left/right of the
right-click menu.
Problem: Currently completion attribute hl_group is combined with
all items, which is redundant and confusing with kind_hlgroup
Solution: Renamed to abbr_hlgroup and combine it only with the abbr item
(glepnir).
closes: vim/vim#158180fe17f8ffb
Co-authored-by: glepnir <glephunter@gmail.com>
Ensure the screen is fully updated before blocking for input. This did
not always happen before, for example when setting `cursorline
scrolloff=9999`, which lead to jerky movement when using some GUI
applications.
Because of the duality of redraw_later, this can't be done in
command-line or when waiting for "Press ENTER". In many of those cases
the redraw is expected AFTER the key press, while normally it should
update the screen immediately. So, those special cases are excluded.
Problem: fixed order of items in insert-mode completion menu
Solution: Introduce the 'completeitemalign' option with default
value "abbr,kind,menu" (glepnir).
Adding an new option `completeitemalign` abbr is `cia` to custom
the complete-item order in popupmenu.
closes: vim/vim#14006closes: vim/vim#157606a89c94a9e