Commit Graph

25099 Commits

Author SHA1 Message Date
zeertzjq
e0bbe8ccf8 vim-patch:9.0.0870: get E967 when using text property in quickfix window
Problem:    Get E967 when using text property in quickfix window. (Sergey
            Vlasov)
Solution:   Do not add an extra NUL and compute the text length correctly.
            (closes vim/vim#11513)

2f7bfe66a1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-05 17:05:33 +08:00
zeertzjq
749fe2c383 vim-patch:9.0.0770: quickfix commands may keep memory allocated
Problem:    Quickfix commands may keep memory allocated.
Solution:   Free memory when it's a bit much. (Yegappan Lakshmanan,
            closes vim/vim#11379)

d8cd6f7427

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-05 17:04:43 +08:00
zeertzjq
1adad44b7c vim-patch:9.0.0749: alloc/free of buffer for each quickfix entry is inefficient
Problem:    Alloc/free of buffer for each quickfix entry is inefficient.
Solution:   Use a shared grow array. (Yegappan Lakshmanan, closes vim/vim#11365)

975a665d48

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-05 17:02:24 +08:00
zeertzjq
1cfe83c2a2 vim-patch:9.0.0736: quickfix listing does not handle very long messages
Problem:    Quickfix listing does not handle very long messages.
Solution:   Use a growarray instead of a fixed size buffer. (Yegappan
            Lakshmanan, closes vim/vim#11357)

f8412c9d7c

Override Test_very_long_error_line() with a rewrite that doesn't use
deferred delete and string interpolation.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-05 16:51:22 +08:00
Mathias Fußenegger
ed05d38d9f
fix(lsp): don't monitor files if workspace_folders is nil (#22531)
Fixes:

    Error SERVER_REQUEST_HANDLER_ERROR: "...di/dev/neovim/neovim/runtime/lua/vim/lsp/_watchfiles.lua
    :200: bad argument #1 to 'ipairs' (table expected, got nil)"

Language servers can be started without root_dir or workspace_folders.
2023-03-05 08:42:15 +01:00
Jon Huhn
ac69ba5fa0
feat(lsp): implement workspace/didChangeWatchedFiles (#22405) 2023-03-05 07:52:27 +01:00
zeertzjq
419819b624
vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)
Problem:    CTRL-X on 2**64 subtracts two. (James McCoy)
Solution:   Correct computation for large number. (closes vim/vim#12103)

5fb78c3fa5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-05 09:18:42 +08:00
zeertzjq
b44b8e7687
test(old): make getting an unused PID work (#22529) 2023-03-05 08:34:58 +08:00
zeertzjq
089f962d6a
vim-patch:9.0.1378: illegal memory access when using virtual editing (#22527)
Problem:    Illegal memory access when using virtual editing.
Solution:   Make sure "startspaces" is not negative.

c99cbf8f28

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-05 08:08:04 +08:00
zeertzjq
39842be8cd
fix(extmarks): don't leak memory on error (#22507) 2023-03-05 07:09:28 +08:00
dundargoc
7100a80253
build: show build type specific compiler flags when using --version
The build type specific flags are defined in the variables
CMAKE_C_FLAGS_<CONFIG>, where <CONFIG> can be DEBUG, RELEASE,
RELWITHDEBINFO and MINSIZEREL.
2023-03-04 20:04:01 +01:00
dundargoc
3683d6b7a8
ci: move configuring cmake to the build part of the CI
If the configuration fails then lints shouldn't be run, as most lint
steps depends on a successful configuration.
2023-03-04 17:55:42 +01:00
Jaehwang Jung
59542504b4
docs(highlight): fix type annotations (#22272) 2023-03-04 17:47:30 +01:00
Christian Clason
46c4cbced5
build(deps): bump msgpack-c to v6.0.0 (#22522)
* Remove C++ requirement if test is disabled
* Change CMake package name of C library to msgpack-c
* Unified all C package, library, cmake, tarball name become msgpack-c.
2023-03-04 17:26:24 +01:00
bfredl
bc26f23e5a
Merge pull request #22415 from bfredl/log_debug
refactor(log): reduce compile time LOG_LEVEL granularity
2023-03-04 17:18:32 +01:00
bfredl
2ba224e152 refactor(log): reduce compile time LOG_LEVEL granularity 2023-03-04 15:26:17 +01:00
zeertzjq
dde5ce46b2
refactor(spell): use uint8_t for "byts" variables (#22519)
Avoid casting back and forth.
2023-03-04 21:09:50 +08:00
Jaehwang Jung
aa16590999
docs(lua): number → integer (#22517) 2023-03-04 13:07:39 +00:00
Jaehwang Jung
82b77900d7
docs(diagnostic): number → integer (#22512) 2023-03-04 13:06:20 +00:00
Jaehwang Jung
65e2feabeb
docs(editorconfig): number → integer (#22514) 2023-03-04 13:05:57 +00:00
Jaehwang Jung
1f07307aeb
docs(inspect): number → integer (#22511) 2023-03-04 13:05:46 +00:00
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