Commit Graph

25964 Commits

Author SHA1 Message Date
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
Christian Clason
5ef7bc50cc build(deps): bump Luv to 1.45.0-0 2023-08-28 11:03:42 +09:00
Christian Clason
eacd5ca6b8 build(deps): bump libuv to v1.46.0 2023-08-28 11:03:42 +09:00
Christian Clason
a6226aea6c build(deps): bump LuaJIT to HEAD - 03c31124c
adapt to upstream build system changes (rolling release)
2023-08-28 11:03:42 +09:00
zeertzjq
8ec03bbc8b
Merge pull request #24907 from neovim/backport-24848-to-release-0.9
[Backport release-0.9] fix(editorconfig): only warn once on errors
2023-08-28 05:14:50 +08:00
Lewis Russell
3cca5449ac fix(editorconfig): only warn once on errors
(cherry picked from commit f3e8942ce2)
2023-08-27 21:04:32 +00:00
zeertzjq
1fc72d3e62
Merge pull request #24906 from neovim/backport-24407-to-release-0.9
[Backport release-0.9] fix(editorconfig): highlight properties with dashes
2023-08-28 05:03:27 +08:00
ObserverOfTime
2aa88ee86a feat(editorconfig): update Lua code in syntax file
(cherry picked from commit 5f29f7b59f)
2023-08-27 20:49:50 +00:00
ObserverOfTime
2ac6405e80 fix(editorconfig): add metadata comment
(cherry picked from commit aa4900dff0)
2023-08-27 20:49:50 +00:00
ObserverOfTime
96dc2d559b fix(editorconfig): highlight properties with dashes
(cherry picked from commit bcf91761bf)
2023-08-27 20:49:50 +00:00
zeertzjq
40361818c1
Merge pull request #24905 from neovim/backport-23462-to-release-0.9
[Backport release-0.9] fix(editorconfig): add missing root validation
2023-08-28 04:47:25 +08:00
Bogdan Grigoruță
11cb728c35 fix(editorconfig): add missing root validation
(cherry picked from commit a94d35fcde)
2023-08-27 20:35:49 +00:00
zeertzjq
62ae5f373a
Merge pull request #24904 from neovim/backport-24871-to-release-0.9
[Backport release-0.9] fix(editorconfig): do not set 'endofline'
2023-08-28 04:27:52 +08:00
Lewis Russell
9f928902c7 fix(editorconfig): do not set 'endofline'
Problem:
  'endofline' can be used to detect if a file ends of <EOL>, however
  editorconfig can break this.

Solution:
  Set 'endofline' during BufWritePre

Fixes: #24869
(cherry picked from commit 84376afc72)
2023-08-27 20:13:39 +00:00
zeertzjq
b30896bbaf
Merge pull request #24885 from neovim/backport-24859-to-release-0.9
[Backport release-0.9] fix(statuscolumn): force full redraw when signcolumn is invalid
2023-08-26 21:25:21 +08:00
Luuk van Baal
13c368eca5 fix(statuscolumn): force full redraw when signcolumn is invalid
Fix #24655

(cherry picked from commit 36108bfa11)
2023-08-26 13:10:44 +00:00
zeertzjq
bb847a8b55
Merge pull request #24883 from neovim/backport-24879-to-release-0.9
[Backport release-0.9] fix(extmarks): wrong display when changing text with virt_lines
2023-08-26 19:53:06 +08:00
Ibby
b353c27338 fix(extmarks): wrong display when changing text with virt_lines
(cherry picked from commit e3e74c363a)
2023-08-26 11:39:24 +00:00
zeertzjq
46fc9d547c
Merge pull request #24809 from neovim/backport-24806-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1759: Visual highlight not working with cursor at end of screen line
2023-08-21 07:28:42 +08:00
zeertzjq
c083d7ac78 vim-patch:9.0.1759: Visual highlight not working with cursor at end of screen line
Problem:  Visual highlight not working with cursor at end of screen line
          and 'showbreak'.
Solution: Only update "vcol_prev" when drawing buffer text.

closes: vim/vim#12865

8fc6a1dae0
(cherry picked from commit 03e7d4fc85)
2023-08-20 23:18:57 +00:00
zeertzjq
016b883def
Merge pull request #24777 from neovim/backport-24776-to-release-0.9
[Backport release-0.9] fix(ui_compositor): only reset skipstart at first column
2023-08-18 12:18:44 +08:00
zeertzjq
2a9af09187 fix(ui_compositor): only reset skipstart at first column
Problem:    A double-width char in a floating window causes an extra
            space to be drawn to the left of its boundary.
Solution:   Only reset skipstart at the first column.

Fix #24775

(cherry picked from commit 6b283f6e01)
2023-08-18 04:08:38 +00:00
zeertzjq
167499d36f
Merge pull request #24768 from neovim/backport-24767-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1734: :runtime completion fails for multiple args
2023-08-18 06:31:29 +08:00
zeertzjq
35bc5d1af3 vim-patch:9.0.1734: :runtime completion fails for multiple args
Problem: :runtime completion fails for multiple args
Solution: Make it work

closes: vim/vim#12616

be5cdd1d63
(cherry picked from commit cc9ba413a4)
2023-08-17 22:20:25 +00:00
zeertzjq
7854874367 vim-patch:9.0.1714: getcompletion() "cmdline" fails after :autocmd
Problem:  getcompletion() "cmdline" fails after :autocmd
Solution: Use set_cmd_context() instead of set_one_cmd_context().

closes: vim/vim#12804

e4c79d3615
(cherry picked from commit 05927f8058)
2023-08-16 06:35:54 +08:00