Problem: r_CTRL-C works differently in visual mode
Solution: Make r_CTRL-C behave consistent in visual mode
in terminal and Windows GUI
in visual mode, r CTRL-C behaves strange in Unix like environments. It
seems to end visual mode, but still is waiting for few more chars,
however it never seems to replace it by any characters and eventually
just returns back into normal mode.
In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area
all characters by a literal CTRL-C.
Not sure why it behaves like this. It seems in the Windows GUI, got_int
is not set and therefore behaves as if any other normal character has
been pressed.
So remove the special casing of what happens when got_int is set and
make it always behave like in Windows GUI mode. Add a test to verify it
always behaves like replacing in the selected area each selected
character by a literal CTRL-C.
closes: vim/vim#13091closes: vim/vim#13112476733f3d0
Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit d2678c78dc)
fix: invoke changed_bytes when rewriting tabs
When tabstop and shiftwidth are not equal, tabs are inserted as individual
spaces and then rewritten as tab characters in a second pass. That second pass
did not call changed_bytes which resulted in events being omitted.
Fixes#25092
(cherry picked from commit 7476715765)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
`LanguageTree:parse` is recursive, and calls
`LanguageTree:for_each_child`, which is also recursive.
That means that, starting from the third level (child of child of root),
nodes will be parsed twice.
Which then means that if the tree is N layers deep, there will be ~2^N
parses even if the branching factor is 1.
Fixes: #25104
This is a maintenance release, focused on bug fixes and improvements.
However, There are included features related to TUI and :terminal.
BRAM
Nvim is a fork of the Vim editor, created and developed by Bram Moolenaar.
On August 3, 2023, he passed away at the age of 62. If Vim or Nvim have
been of use to you in your life, read `:help Bram` and `:help Uganda`
and consider honoring his memory in a way you see fit.
CHANGES SINCE 0.9.1
BREAKING CHANGES
An adjustment was made to the `grid_line` event as part of the exernal
UI protocol the `cells` array might now end with a `[' ', attr, 0]` item
with a repeat count of zero. This is needed by the TUI to disambiguate
final spaces on a line from just clearing the line, which will make a
difference when copying text using the terminal emulators builtin
primary selection support.
External UI:s can safely ignore such an empty item and most UIs already
handle this fine. But it could break some UI:s which has an assert to
validate the cell count to be bigger than zero, or similar checks.
FEATURES
- tui: Support Super and Meta modifiers
- terminal: forward more special keys and modifier-mouse combinations
BUG FIXES
- lua: Always set arg0 to lua scripts
- api: Redundant error when using `nvim_cmd`
- api, lua: Make blank lines in a message work properly
- column: fix bugs related to signs in 'statuscol'
- completion: Don't add backslash in runtime completion
- diff: Filler lines for hunks bigger than linematch limit
- edit: Fix K_EVENT interfering with 'digraph'
- editorconfig: Better validation and error handling
- events: Don't expand non-file as file name
- events: Trigger VimResume on next UI request
- extmarks: Wrong display when changing text with virt_lines
- folds: Update folds in Insert mode with fdm=indent
- helptags: Make multibyte help tags work properly
- highlight: Make CurSearch work properly with 'winhl'
- inccommand: Fix saving of undo info
- keycodes: Recognize <t_xx> as a key
- lsp: Do not assume client capability exists in watchfiles check (#24558)
- mouse: Handle folded lines with virt_lines attached to line above
- remote: Make --remote-expr print to stdout
- remote: Restore previous --remote-expr output formatting
- spell: Splice extmarks on :spellrepall
- startup: Don't truncate when printing with -l
- startup: Run embedded Nvim with real path
- statusline: Redraw when Visual submode changes
- statusline: Fill for double-width char after moving items
- treesitter: updates to queries and injections
- treesitter: Fix TSNode:tree() double free
- ui: Propagate line wrapping state on grid_line events
- ui: Avoid ambiguity about chunk that clears part of line
PERFORMANCE
- extmarks: Avoid unnecessary marktree traversal with folds
- substitute: Don't reallocate new_start every time
BUILD SYSTEM
- deps: Bump libvterm to 0.3.3
- deps: Bump LuaJIT to HEAD - 03c31124c
- deps: Bump libuv to v1.46.0
- deps: Bump Luv to 1.45.0-0
- deps: Bump tree-sitter-c to v0.20.5
- deps: Bump tree-sitter-lua to v0.0.18
Problem: Undo is synced after character find.
Solution: Set no_u_sync when calling gotchars_nop().
closes: vim/vim#13022closes: vim/vim#13024dccc29c228
(cherry picked from commit 311386c09f)
Problem: use-after-free in do_ecmd
Solution: Verify oldwin pointer after reset_VIsual()
e1dc9a6275
N/A patches for version.c:
vim-patch:9.0.1841: style: trailing whitespace in ex_cmds.c
Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit 2ffd8d98fa)
Unfortunately the gc=false objects can refer to a dangling tree if the
gc=true tree was freed first. This reuses the same tree object as the
node itself is keeping alive via the uservalue of the node userdata.
(wrapped in a table due to lua 5.1 restrictions)
Problem: `push_tree`, every time its called for the same TSTree with
`do_copy=false` argument, creates a new userdata for it. Each userdata,
when garbage collected, frees the same TSTree C object.
Solution: Add flag to userdata, which indicates, should C object,
which userdata points to, be freed, when userdata is garbage collected.