Problem: Bundled 'vim' color scheme is written in Vimscript which
implicitly assumes that the file is ported from Vim.
This is not the case, at it is currently the Neovim's way of providing
backward compatibility for color schemes.
Solution: Rewrite it in Lua to indicate that this runtime file comes
from Neovim.
This is the command invoked repeatedly to make the changes:
:%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
fixes#23734
Get rid of the weird attr_pri dance which always seemed like a kludge:
if (!attr_pri) {
wlv.char_attr = hl_combine_attr(wlv.char_attr, extmark_attr);
} else {
wlv.char_attr = hl_combine_attr(extmark_attr, wlv.char_attr);
}
Instead combine extmark attrs with (old-skool) syntax attrs in a consistent way and then combine that with attr_pri and the rest in an _unified_ code path
fixes#23722
Co-authored-by: luukvbaal <luukvbaal@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Duplicating get_option_value() logic for an obscure future refactor
isn't really worthwhile, and findoption() isn't used anywhere else
outside the options code.
Problem: test/functional/ui/screen.lua would be reloaded for each
*_spec.lua file, which causes an extra nvim session to be started
to get the color map each time.
solution: Mark screen.lua as a preloaded file, but defer the
loading of the color map to the first time Screen object is initialised.
Problem: Illegal memory access if popup menu items are changed while the
menu is visible. (Tomáš Janoušek)
Solution: Make a copy of the text. (closesvim/vim#7537)
38455a9213
Co-authored-by: Bram Moolenaar <Bram@vim.org>
The old behaviour (e.g. via `set display-=msgsep`) will not be available.
Assuming that messages always are being drawn on msg_grid
(or not drawn at all, and forwarded to `ext_messages` enabled UI)
will allows some simplifcations and enhancements moving forward.
These were just added to avoid churn when changing the default
of 'display'. To simplify message handling logic, we might want
to remove support for printing messages in default_grid later on.
This would allow things like printing error messages safely in the
middle of redraw, or a future graduation of the 'multigrid' feature.
Problem: Cursorcolumn is sometimes not correct.
Solution: Recompute the cursor column when entering Insert mode and the
cursor is on a character wider than a screen cell.
782c6744b4
Problem: 'cursorline' not always updated with 'cursorlineopt' is
"screenline".
Solution: Call check_redraw_cursorline() more often. (closesvim/vim#10013)
bf269ed0b0
Code was reverted in patch 8.2.4638, so this just ports the test.
Problem: Superfluous check if a redraw is needed for 'cursorline'.
Solution: Remove check_redraw_cursorline(). (closesvim/vim#10030, closesvim/vim#10029)
3e559cd884
redraw_after_callback() is N/A.
Omits changes that just revert code from patch 8.2.4630.
Problem: Cursor line not updated when a callback moves the cursor.
Solution: Check if the cursor moved. (closesvim/vim#9970)
e7a74d5375
redraw_after_callback() is N/A. Nvim handles timers on the main loop.
Problem: 'cursorline' should not apply to 'breakindent'.
Solution: Make 'cursorline' apply to 'breakindent' and 'showbreak'
consistently. (closesvim/vim#8684)
4f33bc20d7
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.
This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).
Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
Previously, the "precedes" character would be rendered on every row
when w_skipcol > 0 (i.e., when viewing a single line longer than the
entire screen), instead of just on the first row. Make sure to only
render it on the first row in this case.
Add a test for this behavior.
Fix documentation for the "precedes" character, which erroneously
stated that it was only active when wrap mode was off.
Problem: Extending sign and foldcolumn below the text is confusing.
Solution: Let the sign and foldcolumn stop at the last text line, just like
the line number column. Also stop the command line window leader.
(Christian Brabandt)
8ee4c01b8c
Closes https://github.com/neovim/neovim/issues/9613
- Lua test correctly fails when 8.1.0849 is reverted.
- 8.1.1001 bug does not manifest in Neovim.
vim-patch:8.1.0849: cursorline highlight is not always updated
Problem: Cursorline highlight is not always updated.
Solution: Set w_last_cursorline when redrawing. Fix resetting cursor flags
when using the popup menu.
c07ff5c60a
vim-patch:8.1.1001: Visual area not correct when using 'cursorline'
Problem: Visual area not correct when using 'cursorline'.
Solution: Update w_last_cursorline also in Visual mode. (Hirohito Higashi,
closesvim/vim#4086)
8156ed3755
Problem: Relative cursor position is not calculated correctly.
Solution: Always set topline, also when window is one line only.
(Robert Webb) Add more info to getwininfo() for testing.
8fcb60f961
Decide whether to highlight the visual-selected character under the
cursor, depending on 'guicursor' style:
- Highlight if cursor is blinking or non-block (vertical, horiz).
- Do NOT highlight if cursor is non-blinking block.
Traditionally Vim's visual selection does "reverse mode", which perhaps
conflicts with the non-blinking block cursor. But 'guicursor' defaults
to a vertical bar for selection=exclusive, and this confuses users who
expect to see the text highlighted.
closes#8983