Commit Graph

25178 Commits

Author SHA1 Message Date
Jaehwang Jung
ccd2cc1abd
docs(uri): number → integer (#22515) 2023-03-04 13:05:16 +00:00
Jaehwang Jung
6a20c29dcd
docs(filetype): number → integer (#22516) 2023-03-04 13:05:01 +00:00
Jaehwang Jung
128b82103b
docs(treesitter): number → integer (#22513) 2023-03-04 13:04:05 +00:00
dundargoc
6cab36e5b7
refactor: replace char_u with char or uint8_t (#22400)
Work on https://github.com/neovim/neovim/issues/459
2023-03-04 20:10:00 +08:00
Christian Clason
a4f443994b
docs(luvref): update to version bump (#22508) 2023-03-04 10:45:20 +01:00
zeertzjq
de14f2c928
Merge pull request #22506 from zeertzjq/vim-9.0.0013
vim-patch:9.0.{partial:0013,0016}: fix memory access errors
2023-03-04 14:19:53 +08:00
zeertzjq
b7d59649ac fix(redraw): get the line again after evaluating something 2023-03-04 13:53:09 +08:00
zeertzjq
808691e399 fix(luado): get old_line length before executing Lua code 2023-03-04 13:53:09 +08:00
zeertzjq
98e8464319 vim-patch:9.0.0016: comparing line pointer for 'breakindent' is not reliable
Problem:    Comparing line pointer for 'breakindent' is not reliable.
Solution:   Make a copy of the line.

c2a79b87fc

Test changes have been squashed into the previous commit.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-04 13:53:09 +08:00
zeertzjq
0a897f89c5 vim-patch:partial:9.0.0013: reproducing memory access errors can be difficult
Problem:    Reproducing memory access errors can be difficult.
Solution:   When testing, copy each line to allocated memory, so that valgrind
            can detect accessing memory before and/or after it.  Fix uncovered
            problems.

fa4873ccfc

Since test_override() is N/A, enable ml_get_alloc_lines when ASAN is
enabled instead, so it also applies to functional tests.

Use xstrdup() to copy the line as ml_line_len looks hard to port.

Squash the test changes from patch 9.0.0016.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-04 13:53:09 +08:00
zeertzjq
446c353a50
vim-patch:9.0.1376: accessing invalid memory with put in Visual block mode (#22505)
Problem:    Accessing invalid memory with put in Visual block mode.
Solution:   Adjust the cursor column if needed.

1c73b65229

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-04 08:39:54 +08:00
Christian Clason
b48ad28a3e
build(deps): bump Luv to HEAD - e5da6417d (#22502) 2023-03-04 00:32:00 +01:00
dundargoc
0007aa50bd
build: unset variables ending with "URL" if USE_EXISTING_SRC_DIR is ON
This will reduce required boilerplate, but more importantly it will
automatically unset variables ending on URL. This will help people
needing to avoid to unset the URL variable each time a new dependency is
added.

It is possible that this may remove a non-download variable ending on
"URL" in the future, however, the risk of this is likely much lower than
the risk of someone forgetting to unset the variable.
2023-03-04 00:30:07 +01:00
Christian Clason
7e90f247e7
fix(treesitter): raise ts_match_limit to 256 (#22497)
Problem: Some complex queries may not return all matches.

Solution: Raise `ts_match_limit` from current 64 (twice the original
default) to 256 (which Helix uses, and seems to be enough for the reported
problematic cases).

If this leads performance regressions in other queries, we should add a
generic querying timeout instead of relying on a low value here.
2023-03-03 16:16:17 +01:00
Gregory Anders
bf90ceb548
fix(treesitter): break early from loop when match is found (#22499)
Fixup to #22484.
2023-03-03 07:52:57 -07:00
zeertzjq
a88c18c24e
vim-patch:9.0.0527: long sign text may overflow buffer (#22496)
Problem:    Long sign text may overflow buffer.
Solution:   Use a larger buffer.  Prevent for overflow.

2b1ddf19f8

Don't change the size of extra[] as it's already large enough.

N/A patches for version.c:

vim-patch:9.0.0523: more compiler warnings for arguments in small version

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 22:24:12 +08:00
Justin M. Keyes
ef52592cf8
Merge #22493 lua2dox.lua, vim.treesitter tags 2023-03-03 09:19:29 -05:00
Justin M. Keyes
57f26e0903 docs: lua2dox.lua debugging 2023-03-03 15:07:23 +01:00
Justin M. Keyes
8414cfe7f4 docs: fix vim.treesitter tags
Problem:
Help tags like vim.treesitter.language.add() are confusing because
`vim.treesitter.language` is (thankfully) not a user-facing module.

Solution:
Ignore the "fstem" when generating "treesitter" tags.
2023-03-03 15:07:23 +01:00
bfredl
506ffde1a7
Merge pull request #22442 from bfredl/quickmake
refactor(build): spring cleaning of compile time checks
2023-03-03 14:53:37 +01:00
Christian Clason
98e051783c
feat(treesitter): bundle query parser and queries (#22483)
skip injections for now
2023-03-03 14:27:30 +01:00
bfredl
2cffd04833 refactor(build): graduate -Wvla, -fno-common and -Og "features"
These are in gcc 4.9+ which we require anyway.
-Og is safe on clang as well (reserved for a future debug-optimize mode,
and currently does the same as -O1 which is reasonable)
2023-03-03 14:26:29 +01:00
bfredl
848dac0aaa refactor(build): graduate unibilium VAR_FROM feature from 2017 2023-03-03 14:26:11 +01:00
bfredl
c9b6db4541 refactor(build): graduate msgpack-c FLOAT32 "feature" since forever 2023-03-03 14:26:10 +01:00
bfredl
c002fd421e refactor(build): graduate libtreesitter features which are 1+ years old 2023-03-03 14:25:20 +01:00
bfredl
1b3c1f6c06 refactor(build): graduate HAVE_LOCALE_H feature
Merge locale.h into os/lang.h
Having a source file with the same name as a system header we use is
considered an anti-pattern.
2023-03-03 14:19:46 +01:00
bfredl
166b149d5b refactor(build): remove unused stdlib function and include checks
In addition: merge some checks for the same feature into one
test_compile. This reduces the total number of test compiles
which speeds up the cmake configure stage.
2023-03-03 14:19:46 +01:00
Christian Clason
74c9c413e7
Merge pull request #22484 from gpanders/inspect-tree-fix-cursor
fix(treesitter): maintain cursor position when toggling anonymous nodes
2023-03-03 14:19:09 +01:00
zeertzjq
fbaf5bde55
Merge pull request #22494 from zeertzjq/vim-9.0.0531
vim-patch:9.0.{partial:0531,0533}: the win_line() function is much too long
2023-03-03 19:48:53 +08:00
zeertzjq
bdde07f60e vim-patch:9.0.0533: the win_line() function is much too long
Problem:    The win_line() function is much too long.
Solution:   Move code to separate functions.

e49f9acecc

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 19:28:56 +08:00
zeertzjq
a7dbfec9f3 vim-patch:partial:9.0.0531: the win_line() function is much too long
Problem:    The win_line() function is much too long.
Solution:   Move code to separate functions.

c20a41972c

Partial port as this depends on patch 9.0.0148.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 19:28:56 +08:00
zeertzjq
bf44556906 refactor(drawline.c): move number column helpers function together 2023-03-03 19:09:53 +08:00
Jaehwang Jung
f0a2ffab29
fix(treesitter): typos in _range.lua
fix(treesitter): typos _range.lua
2023-03-03 11:05:59 +00:00
Lewis Russell
6d4f481821
fix(treesitter): disallow empty filetypes
Fixes #22473
2023-03-03 09:44:02 +00:00
zeertzjq
89cccea167
vim-patch:9.0.0519: the win_line() function is much too long (#22491)
Problem:    The win_line() function is much too long.
Solution:   Move the code to draw the line number to a separate function.

d7657e95b2

N/A patches for version.c:

vim-patch:9.0.0521: compiler warns for unused argument in small version

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 17:24:14 +08:00
zeertzjq
5311c9048a
refactor(win_line): move some variables into a struct (#22490)
This reduces the number of arguments to helpers functions.

N/A patches for version.c:

vim-patch:9.0.0152: warning for unused argument in small build

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 14:50:37 +08:00
zeertzjq
1dd2424b12
Merge pull request #22488 from zeertzjq/vim-9.0.1373
vim-patch:9.0.{0690,0691,0991,1373}: listchars fixes
2023-03-03 11:26:22 +08:00
zeertzjq
bcf077414c vim-patch:9.0.1373: wrong text displayed when using both 'linebreak' and 'list'
Problem:    Wrong text displayed when using both 'linebreak' and 'list'.
Solution:   Only set "c_extra" to NUL when "p_extra" is not empty. (Hirohito
            Higashi, closes vim/vim#12065)

194555c001

Cherry-pick a change from patch 9.0.0153.

Co-authored-by: h-east <h.east.727@gmail.com>
2023-03-03 11:00:47 +08:00
zeertzjq
4a3594f60e vim-patch:9.0.0991: crash when reading help index with various options set
Problem:    Crash when reading help index with various options set. (Marius
            Gedminas)
Solution:   Do not set wlv.c_extra to NUL when wlv.p_extra is NULL.
            (closes vim/vim#11651)

c67c89c758

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 07:54:26 +08:00
zeertzjq
c2e602b9d0 vim-patch:9.0.0691: lalloc(0) error in listchars test
Problem:    lalloc(0) error in listchars test.
Solution:   Skip generating text for tab if tab_len is zero.

2b7b4f7670

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 07:54:25 +08:00
zeertzjq
a974d1511e vim-patch:9.0.0690: buffer size for expanding tab not correctly computed
Problem:    Buffer size for expanding tab not correctly computed.
Solution:   Correctly use size of end character.

a0789478f6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-03 07:54:01 +08:00
zeertzjq
361de6d54d
vim-patch:9.0.1371: ballooneval interferes with Insert completion (#22487)
Problem:    Ballooneval interferes with Insert completion.
Solution:   Ignore mouse-move events when completing. (closes vim/vim#12094,
            closes vim/vim#12092)

440d4cb55b
2023-03-03 07:44:16 +08:00
Amaan Qureshi
fdb6b4d2e7
vim-patch:9.0.1368: Bass files are not recognized (#22485)
Problem:    Bass files are not recognized.
Solution:   Add patterns for Bass files. (Amaan Qureshi, closes vim/vim#12088)

4ed914b18a
2023-03-02 23:29:03 +01:00
dundargoc
4cf4ae93df
build: cmake cleanup (#22251)
- Remove unused code
- Use consistent casing. Variable names such as LibLuV_LIBRARIES is
  needlessly jarring, even if the name might be technically correct.
- Use title casing for packages. find_package(unibilium) requires the
  find_module to be named "Findunibilium.cmake", which makes it harder
  to spot when scanning the files. Instead, use "Unibilium".
2023-03-02 22:50:43 +01:00
Gregory Anders
86ff239240 refactor(treesitter): use string.format to create lines 2023-03-02 14:15:18 -07:00
Gregory Anders
2eeafc43c4 fix(treesitter): maintain cursor position when toggling anonymous nodes
When toggling anonymous nodes in the :InspectTree window, keep the
cursor fixed relative to the node within the tree. This prevents the
cursor from jumping.
2023-03-02 14:11:15 -07:00
Christian Clason
f449121764
feat(treesitter): add :InspectTree command (#22477) 2023-03-02 18:03:11 +01:00
Justin M. Keyes
b0b4c31097
refactor: rename show_tree => inspect_tree #22474
Problem:
"show" is potentially a new verb that we can avoid (there is already
"open" and "echo"). Even if we can't avoid it, the behavior of
`show_tree` fits well in the "inspect" family of functions: a way for
users to introspect/reflect on the state of Nvim.

Existing "inspect" functions:
    vim.inspect()
    vim.inspect_pos()
    vim.treesitter.inspect_language()
    nvim__inspect_cell

Solution:
Rename `show_tree` to `inspect_tree`.
2023-03-02 07:01:42 -08:00
dundargoc
a0292b4e5f
build: remove libfindmacros library (#22423)
Large parts the library weren't being used, and the parts that were was overly
abstracted for our use case. Additionally, part of its use case was to abstract
pkgconfig boilerplate, which is no longer needed as pkgconfig has been removed
in favor of relying on cmake alone in 09118052ce.
2023-03-02 10:22:41 +01:00
zeertzjq
fb1db80f5a
test(treesitter/parser_spec): correct time unit (#22471) 2023-03-02 14:42:15 +08:00