Commit Graph

25788 Commits

Author SHA1 Message Date
zeertzjq
94246472e3
Merge pull request #25279 from neovim/backport-25277-to-release-0.9
[Backport release-0.9] fix(statuscolumn): update number hl for each screen line
2023-09-21 07:38:19 +08:00
zeertzjq
a89c385f33 fix(statuscolumn): update number hl for each screen line
(cherry picked from commit b2332e0853)
2023-09-20 23:03:47 +00:00
zeertzjq
926b8f9120
Merge pull request #25250 from neovim/backport-25228-to-release-0.9
[Backport release-0.9] test(tui_spec): update cursor_address test for wrap flag
2023-09-20 07:21:31 +08:00
zeertzjq
1b8132880d test(tui_spec): update cursor_address test for wrap flag
(cherry picked from commit 186895bca4)
2023-09-19 22:56:17 +00:00
zeertzjq
3f796c5410
Merge pull request #25249 from neovim/backport-25248-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1915: r_CTRL-C works differently in visual mode
2023-09-20 06:54:46 +08:00
zeertzjq
82e0a6028c vim-patch:9.0.1915: r_CTRL-C works differently in visual mode
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#13091
closes: vim/vim#13112

476733f3d0

Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit d2678c78dc)
2023-09-19 22:38:39 +00:00
zeertzjq
cb211e5746
Merge pull request #25226 from neovim/backport-25223-to-release-0.9
[Backport release-0.9] fix: fix use after free
2023-09-18 07:22:20 +08:00
sid-6581
28f600337f fix: fix use after free
(cherry picked from commit 8a0eb90e14)
2023-09-17 23:07:30 +00:00
zeertzjq
26c6d78a0c
Merge pull request #25206 from neovim/backport-25204-to-release-0.9
[Backport release-0.9] docs(tutor): clarify the meaning of ✗ and ✓
2023-09-17 09:06:21 +08:00
zeertzjq
249e930eaf docs(tutor): clarify the meaning of ✗ and ✓
Also reformat tutor.tutor.json to use 2-space indent while at it.

(cherry picked from commit f619ea1fc1)
2023-09-17 00:51:46 +00:00
zeertzjq
7fd12dabcc
Merge pull request #25202 from zeertzjq/backport
Backport to release-0.9
2023-09-17 07:12:42 +08:00
Phelipe Teles
3a5b46e6bb fix(lua): not using global value in vim.opt_global 2023-09-17 06:44:43 +08:00
Lewis Russell
68ae7ea529 refactor: rename _meta.lua to _options.lua 2023-09-17 06:44:14 +08:00
zeertzjq
3f5f6d412b
Merge pull request #25200 from neovim/backport-25199-to-release-0.9
[Backport release-0.9] test(plugin/man_spec): use pesc() on actual_file in pattern
2023-09-17 06:18:20 +08:00
zeertzjq
aa04090e92 test(plugin/man_spec): use pesc() on actual_file in pattern
(cherry picked from commit 8f1e344339)
2023-09-16 22:08:11 +00:00
github-actions[bot]
cdb8c46253
[Backport release-0.9] fix: invoke changed_bytes when rewriting tabs (#25174)
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>
2023-09-15 04:12:21 -07:00
L Lllvvuu
f0898d438e [Backport release-0.9] fix(treesitter): language.add - only register parser if it exists
Backport of #25151.

Fixes: #24531
2023-09-15 10:10:37 +02:00
zeertzjq
d1813f73b8
Merge pull request #25144 from neovim/backport-24983-to-release-0.9
[Backport release-0.9] fix(rpc): fix race condition
2023-09-14 09:34:53 +08:00
Sergey Slipchenko
9df72d3f9f fix(rpc): fix race condition
(cherry picked from commit d42343146a)
2023-09-14 01:20:49 +00:00
zeertzjq
cd6536c140
Merge pull request #25142 from neovim/backport-25133-to-release-0.9
[Backport release-0.9] fix(float): update position of anchored windows first
2023-09-14 07:54:05 +08:00
zeertzjq
d1cce10702 fix(float): update position of anchored windows first
(cherry picked from commit 4ca0441e14)
2023-09-13 23:42:42 +00:00
Christian Clason
fc8d1f7c7e
Merge pull request #25122 from neovim/backport-25121-to-release-0.9
[Backport release-0.9] fix(treesitter): fixup for InspectTree
2023-09-12 17:36:03 +02:00
Lewis Russell
f0b1e46f91 fix(treesitter): fixup for InspectTree
Fixes #25120

(cherry picked from commit 040cba1faa)
2023-09-12 14:56:07 +00:00
Christian Clason
57aeacc344
Merge pull request #25117 from neovim/backport-25115-to-release-0.9
[Backport release-0.9] fix(treesitter): remove more double recursion
2023-09-12 13:33:14 +02:00
Lewis Russell
5f8676c268 fix(treesitter): remove more double recursion
Do not call `for_each_child` in functions that are already recursive.

(cherry picked from commit e76ae3d232)
2023-09-12 11:23:31 +00:00
Christian Clason
c7b316f71a
Merge pull request #25111 from llllvvuu/backport/25109
[Backport release-0.9] fix(languagetree): remove double recursion in LanguageTree:parse
2023-09-12 09:22:56 +02:00
L Lllvvuu
64160bac5b
[Backport release-0.9] fix(languagetree): remove double recursion in LanguageTree:parse
`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
2023-09-12 00:22:30 -07:00
zeertzjq
51edadcaeb
Merge pull request #25091 from neovim/backport-25090-to-release-0.9
[Backport release-0.9] fix(mouse): click on 'statuscolumn' with 'rightleft'
2023-09-11 08:42:24 +08:00
zeertzjq
284c2e0124 fix(mouse): click on 'statuscolumn' with 'rightleft'
(cherry picked from commit 1fc29b920f)
2023-09-11 00:29:52 +00:00
bfredl
e20f3a815a version bump 2023-09-07 12:27:38 +02:00
bfredl
fe869a8ce2 NVIM 0.9.2
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
2023-09-07 12:26:08 +02:00
zeertzjq
3a13777289
Merge pull request #25022 from neovim/backport-25021-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1866: undo is synced after character find
2023-09-05 06:41:04 +08:00
zeertzjq
4728f2d2f9 vim-patch:9.0.1866: undo is synced after character find
Problem:  Undo is synced after character find.
Solution: Set no_u_sync when calling gotchars_nop().

closes: vim/vim#13022
closes: vim/vim#13024

dccc29c228
(cherry picked from commit 311386c09f)
2023-09-04 22:26:12 +00:00
zeertzjq
6490d937b2
Merge pull request #24999 from neovim/backport-24997-to-release-0.9
[Backport release-0.9] perf(substitute): don't reallocate new_start every time
2023-09-03 12:43:49 +08:00
zeertzjq
bee2ee211c perf(substitute): don't reallocate new_start every time
(cherry picked from commit f5f35a7c18)
2023-09-03 04:33:16 +00:00
zeertzjq
876cb05e2a
Merge pull request #24995 from neovim/backport-24993-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1840: [security] use-after-free in do_ecmd
2023-09-03 11:27:11 +08:00
zeertzjq
ed626d2f8f vim-patch:9.0.1840: [security] use-after-free in do_ecmd
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)
2023-09-03 03:16:02 +00:00
zeertzjq
c23bff6603
Merge pull request #24984 from zeertzjq/backport
Backport to release-0.9
2023-09-02 19:20:56 +08:00
zeertzjq
f54806fd7f fix(ui): avoid ambiguity about chunk that clears part of line
Co-authored-by: bfredl <bjorn.linse@gmail.com>
2023-09-02 18:58:59 +08:00
zeertzjq
3c5339ba36 test(tui): add test for overriding argv[0] 2023-09-02 18:58:56 +08:00
zeertzjq
40a7228dcc fix(startup): run embedded Nvim with real path 2023-09-02 18:58:52 +08:00
t0muxx
a285a0b36d fix(tui): v:argv does not report the original argv[0] 2023-09-02 18:58:30 +08:00
zeertzjq
3ada031231
Revert "Revert "[Backport release-0.9] fix(ui): propagate line flags on grid_line events""
This reverts commit be14ead380.
2023-09-02 17:16:54 +08:00
zeertzjq
be14ead380
Revert "[Backport release-0.9] fix(ui): propagate line flags on grid_line events" 2023-08-31 12:04:57 +08:00
github-actions[bot]
fec20ce15c
[Backport release-0.9] fix(filetype): make sure buffer is valid before call nvim_buf_call (#24950)
fix(filetype): make sure buffer is valid before call nvim_buf_call

(cherry picked from commit c3e611694e)

Co-authored-by: HongboLiu <lhbf@qq.com>
2023-08-30 12:21:01 -05:00
Christian Clason
033059e781
Merge pull request #24923 from neovim/fix/ts-double-free
[backport release-0.9] fix(treesitter): fix TSNode:tree() double free
2023-08-29 18:20:46 +02:00
bfredl
32de3f98ed fix(treesitter): fix another TSNode:tree() double free
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)
2023-08-29 17:35:20 +02:00
nwounkn
a3c963adfc fix(treesitter): fix TSNode:tree() double free (#24796)
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.
2023-08-29 10:51:44 +02:00
Christian Clason
e3389c1533 build(deps): bump tree-sitter-lua to v0.0.18
also update highlight queries
2023-08-28 11:03:42 +09:00
Christian Clason
f5e6f592b6 build(deps): bump tree-sitter-c to v0.20.5
also update highlight queries and test

fixup: tests
2023-08-28 11:03:42 +09:00