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.
Ref: #9342
Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`.
Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`.
The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
Don't add sign extmarks to state->active. Instead when drawing signs,
perform a full line scan for sign marks. This allows decor_redraw_line
to be moved back inside the `!number_only` block in screen.c, which
prevents decor scans when redrawing the number column when
'relativenumber' is set.
Fixes: #17638
Add the following options to extmarks:
- sign_text
- sign_hl_group
- number_hl_group
- line_hl_group
- cursorline_hl_group
Note: ranges are unsupported and decorations are only applied to
start_row
This commit finishes support for colored and styled underlines adding
`CSI 4 : [2,4,5] m` support providing double, dashed, and dotted
underlines
Fixes#17362.
Add tests for:
- Cursor position restored after :map expr
- Cursor position restored after :imap expr
- Error in :cmap expr handled correctly
Cherry-picked from #12837
When `signcolumn=number` but no sign on a given line has any text,
display the line's line number instead of the (empty) sign text in the
line number column.
Nvim already resizes grid to the required width, so there is no need to
truncate the text in pum_redraw(). What's more, truncation is currently
done incorrectly because Vim patch 8.2.1995 was ported incorrectly.
This nearly reverts the truncation part of Vim patch 8.2.1995, but not
the part that reduces unnecessary calls to pum_redraw(). The original PR
https://github.com/vim/vim/pull/7306 didn't explain much about which
part of it actually reduces redraws.
Problem: Filler lines are incorrect for other window in diff mode after
making a change.
Solution: Copy filler lines from the current window. (closesvim/vim#8809)
841c225b9e
Do not copy a lot of lua strings (dict keys) to just strequal() them
Just compare them directly to a dedicated hash function.
feat(generators): HASHY McHASHFACE
win_set_buf can trigger autocmds if noautocmd=false. If they close the window,
code afterwards will dereference the freed win_T* wp pointer.
This interaction became possible after commit 1def3d1542.
The reason deleting curbuf crashes, and not the buf passed to
`nvim_open_win`, is because the float initially edits curbuf (`win_init`)
until it's later set to edit buf (windows from `:new` and `:split <buf>`
behave similiarly: approx. `:split`, then `:buffer <buf>`).
`do_buffer` closes windows when their edited buffer is deleted (unless
it's the only window; N/A for floats), so the float closes when curbuf
is deleted, so we need to check `win_valid` after `win_set_buf` too.
Closes#15548
N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the
window (including border). This line may also need change in this case (change
0 to -1):
This is most consistent and easiest to reason about, especially with GUIs whose
border do not need to have width/height of 1/1 in cell units.
Fix#15789
Since the `State` is global, other scripts are unexpectedly affected during the
'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in
order to ignore trailing '|'-separated commands only for the command invoking
the preview.
fix#8796, update #7494
Problem: Filler lines are wrong when changing text in diff mode.
Solution: Don't change the filler lines on every change. Check
scrollbinding when updating the filler lines. (closesvim/vim#8809)
04626c243c
Currently, multigrid mouse drag positions are handled incorrectly if the
drag event is not in the top left grid. Fix this by not adjusting the
position of the event in jump_to_mouse.
related: #15091
Fix relative floating windows so that they open in the correct position
relative to each other. Also make sure that their positions are correct
immediately after creation without a redraw.
* Revert "vim-patch:8.1.2294: cursor pos wrong with concealing and search causes a scroll"
* Add a test which covers #13074910bbc3cca
while reverting the screen.c code changes from there.
Fixes#14064
Problem: 'cursorline' should not apply to 'breakindent'.
Solution: Make 'cursorline' apply to 'breakindent' and 'showbreak'
consistently. (closesvim/vim#8684)
4f33bc20d7
* Add buffer information to tabline_update
Most terminal implementations of the tabline display buffer and tab
information. Many neovim-qt users disable GuiTabline because it lacks
functionality provided in the terminal implementation.
The tabline_update event should include buffer information too, so client GUIs
can display rich useful tabs.
Problem: Spell suggestions insufficiently tested.
Solution: Add spell suggestion tests. (Dominique Pelle, closesvim/vim#5398)
e9a8d1f9ad
Requires latest en.utf-8.spl from
https://ftp.nluug.nl/pub/vim/runtime/spell/.
Include the following patch because patch v8.2.0946 was merged:
vim-patch:8.2.0948: spell test fails
Problem: Spell test fails.
Solution: Adjust expected text of the prompt.
d281b7c227
Since the providers are ordered by ns_id, inserting a new provider may
require shifting existing providers around to maintain this ordering.
When this happens, we need to allocate a new element at the end of the
vector and then shift the larger elements to the right. Rather than
iterating (incorrectly) with a loop and copying each item, use memmove
to copy the entire block.
It looks solid with the default `FloatBorder` group.
If you set the bgcolor of FloatBorder to the same color as for FloatNormal, you
effectively get an "1-cell padding".
Problem: Highlighting for :s wrong when using different separator.
Solution: Use separat argument for search direction and separator. (Rob
Pilling, closesvim/vim#5665)
c036e87bd7
Problem: Status line is not updated when going to cmdline mode.
Solution: Redraw status lines if 'statusline' is set and going to status
line mode. (based on patch from Justin M. Keyes et al.,
closesvim/vim#8044)
ce0b75711a
before, calling vim.schedule() from inside an event would execute
the scheduled callback immediately after this event without
checking for user input in between. Break event processing
whenever user input or an interrupt is available.
* Fix click on foldcolumn if it has tabline
* Fixes to correctly determine if tablie was clicked when multigrid is enabled
* Separate foldcolumn checks into functions
* Add test case for click on foldcolumn with split window
* Fix foldcolumn click used nvim_input() on multigrid enabled
before the behaviour of 'mouse' was inconsistent in external UI,
as some remapping logic would check has_mouse() and others don't
(no difference in TUI or vim classic). With this change, the behaviour
is consistently up to the UI decide (see ui.txt edit)
Behaviour of tui.c is unaffected by this change.
Problem: Mode is not cleared when leaving Insert mode with mapped Esc.
Solution: Clear the mode when redraw_cmdline is set. (closesvim/vim#4269)
4c25bd785a
Problem: Peeking and flushing output slows down execution.
Solution: Do not update the mode message when global_busy is set. Do not
flush when only peeking for a character. (Ken Takata)
cb574f4154
"set foldcolumn=auto" is documented but not supported.
Support it by making it behave as "auto:1", similar to "signcolumn".
Close https://github.com/neovim/neovim/pull/13561
When create tab, win_hide sent to new tab and new tab's previous tab.
So, if created tab that not next tab (eg. $tabnew cmd),
send win_hide to not current tab, and fixed this.
Opt in to this secret world using
set wildchar=0
" already the default, but remove if non-zero existing config:
set wildcharm=0
now you can map 'wildmode' just like any mode:
cnoremap <tab> <c-z>
function! Spacey()
return getcmdline()[-1:] == "/" ? "\<bs>" : ""
endfunc
cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/"
Possibly asked questions:
What about backwards compatibility?
====
Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working.
Doesn't `<c-z>` mean suspend?
====
Not in cmdline mode. If it would then the recommended wildcharm would not
have been `<c-z>` to start with.
My config relies on `:<c-z>` being a synonym to `:<nop>`!
====
just no.
Problem: Command line is not cleared when switching tabs and the command
line height differs.
Solution: Set the "clear_cmdline" flag when needed. (Naruhiko Nishino,
closesvim/vim#5495)
479950f6c9
- The previous commit lost information in the tests. Instead, add some
more "normalization" substitutions in pcall_err(), so that the general
shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
Problem: 'verbose' value 16 causes duplicate output.
Solution: Combine levels 15 and 16 into one message. (Christian Brabandt,
closesvim/vim#6153)
823654bc06
54ce101 changed the way undo entries are created when adding decorations.
This creates all sorts of problems.This change fixes the problem by
reverting to the previous behavior.
as well as copy_text_attr, text_to_screenline.
Display of folded line is now done via win_line, which reduces code
deduplication.
As fold_line was a trimmed down version of win_line, this change brings
new features such CursorLineNr highighting even on folded line, as well
as CursorLine highlighting.
- TUI: Fix a case where the cursor was not displayed after hiding the
cursor and then setting it to be displayed again.
- Change to reset everything before setting guicursor.
fixes#12800close#12811
Steps to reproduce:
nvim -u NORC
:set termguicolors
:hi nCursor guifg=red guibg=red
:hi iCursor guifg=green guibg=green
:hi cCursor guifg=blue guibg=blue
:set guicursor=n:block-nCursor,i:hor25-iCursor,c:ver25-cCursor
:set guicursor-=c:ver25-cCursor
Actual behaviour: Cursor is a blue vertical.
Expected behaviour: Cursor should be the default color block.
- remove redundant autocmd list
This "grouped" list is useless, it only gets in the way when searching
for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90. closes#11960
- options: remove 'guifontset'. Why:
- It is complicated and is used by almost no one.
- It is unlikely to be implemented by Nvim GUIs (complicated to parse,
specific to Xorg...).