Commit Graph

27879 Commits

Author SHA1 Message Date
Luuk van Baal
f4001d27ef perf(column): only invalidate lines affected by added sign 2023-11-29 10:17:15 +00:00
bfredl
584c6c25cc
Merge pull request #26292 from luukvbaal/decor
fix(decorations): do not apply sign highlight id as range attr id
2023-11-29 11:12:25 +01:00
zeertzjq
640680ccce
vim-patch:9.0.2134: ml_get error when scrolling (#26264)
Problem:  ml_get error when scrolling after delete
Solution: mark topline to be validated in main_loop
          if it is larger than current buffers line
          count

reset_lnums() is called after e.g. TextChanged autocommands and it may
accidentally cause curwin->w_topline to become invalid, e.g. if the
autocommand has deleted some lines.

So verify that curwin->w_topline points to a valid line and if not, mark
the window to have w_topline recalculated in main_loop() in
update_topline() after reset_lnums() returns.

fixes: vim/vim#13568
fixes: vim/vim#13578

c4ffeddfe5

The error doesn't happen in Nvim because Nvim triggers TextChanged after
calling update_topline().

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-29 13:24:24 +08:00
zeertzjq
64b53b71ba
refactor(IWYU): create normal_defs.h (#26293) 2023-11-29 12:10:42 +08:00
Luuk van Baal
a0e9ef09d7 fix(decorations): do not apply sign highlight id as range attr id 2023-11-29 03:57:23 +01:00
zeertzjq
8868ecd401
vim-patch:9.0.2136: MSVC errorformat can be improved (#26283)
Problem:  MSVC errorformat can be improved
Solution: parse error type and column number in MSVC errorformat

closes: vim/vim#13587

8ceb99001b

Co-authored-by: Shawn Hatori <shawn.hatori@gmail.com>
2023-11-29 07:22:13 +08:00
Gregory Anders
a9b4dc9614
fix(man): set the nested flag for the BufReadCmd autocommand (#26285)
The nested flag must be set so that other autocommands can fire while
the BufReadCmd is still executing.
2023-11-28 17:02:44 -06:00
zeertzjq
aa9d9cafd0
vim-patch:9.0.2135: No test for mode() when executing Ex commands (#26282)
Problem:  No test for mode() when executing Ex commands
Solution: Add some test cases and simplify several other test cases.
          Also add a few more test cases for ModeChanged.

closes: vim/vim#13588

fcaeb3d42b
2023-11-29 06:51:00 +08:00
Gregory Anders
b7831c7f99
fix(termcap): use tmux passthrough sequence when running in tmux (#26281)
tmux intercepts and ignores XTGETTCAP so wrap the query in the tmux
passthrough sequence to make sure the query arrives at the "host"
terminal.

Users must still set the 'allow-passthrough' option in their tmux.conf.
2023-11-28 16:34:18 -06:00
dundargoc
79b6ff28ad refactor: fix headers with IWYU 2023-11-28 22:23:56 +01:00
bfredl
d85e9935f2
Merge pull request #26276 from luukvbaal/decor
refactor(decor): remove sign conditions that are always true
2023-11-28 20:39:59 +01:00
dundargoc
bcaff309b6 build: disable UnusedIncludes from clangd
Include Cleaner is enabled by default since clangd 17 and gives
incorrect suggestions.
2023-11-28 20:22:59 +01:00
Luuk van Baal
898f8d1f0b refactor(decor): remove sign conditions that are always true 2023-11-28 19:23:57 +01:00
Luuk van Baal
35cec0de4a fix(column): redraw and update signcols for paired extmark
Problem:  Signcolumn width does not increase when ranged sign does not
          start at sentinel line.
Solution: Handle paired range of added sign when checking signcols.
2023-11-28 16:44:20 +00:00
Samuel (ThinLinc team)
adb2258345
fix(rplugin): dont create data dir if it's a broken symlink #25726
Checking if it's non-empty and not a directory gets us quite far, but
not all the way. While a working symlink would trigger the earlier
checks, a broken symlink does not.

This commit fixes the special case where ~/.local/share/nvim  already
exists but is a broken symlink. Thus, it fixes the following error on
startup:

E739: Cannot create directory /home/samuel/.local/share/nvim: file
already exists
2023-11-28 03:17:39 -08:00
zeertzjq
c9f53d0e40
refactor: iwyu (#26269) 2023-11-28 19:00:14 +08:00
bfredl
ba564442ae
Merge pull request #26249 from bfredl/concealchar
feat(decoration): allow conceal_char to be a composing char
2023-11-28 11:01:21 +01:00
bfredl
ae3685798d feat(decoration): allow conceal_char to be a composing char
decor->text.str pointer must go. This removes it for conceal char,
in preparation for a larger PR which will also handle the sign case.

By actually allowing composing chars for a conceal chars, this
becomes a feature and not just a refactor, as a bonus.
2023-11-28 10:35:25 +01:00
zeertzjq
71e954ad30
refactor(IWYU): fix includes for ugrid.h (#26267) 2023-11-28 17:01:27 +08:00
zeertzjq
570367ac83
docs(lua): don't include remote-only API functions (#26266) 2023-11-28 13:52:17 +08:00
zeertzjq
e6d38c7dac
vim-patch:9.0.2133: Cannot detect overstrike mode in Cmdline mode (#26263)
Problem:  Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike

closes: vim/vim#13569

d1c3ef1f47
2023-11-28 11:46:20 +08:00
zeertzjq
1a8f60c7d2
refactor: move hashtab types to hashtab_defs.h (#26262) 2023-11-28 10:47:22 +08:00
Famiu Haque
3a3474371b
refactor(options): replace p_force_(on|off) with immutable (#26209)
Problem: We use the `p_force_on` and `p_force_off` variables to check if a variable is immutable and what its default value is. This is not only hacky and unintuitive, but also is limited to only boolean options.

Solution: Replace `p_force_on` and `p_force_off` with an `immutable` property for options, which indicates if an option is immutable. Immutable options cannot be changed from their default value.

Ref: #25672.
2023-11-28 08:15:26 +08:00
Christian Clason
a314703cf1
vim-patch:9.0.2131: not all nushell files detected (#26260)
Problem:  not all nushell files detected
Solution: use *.nu to detect nushell files

closes: vim/vim#13586

b9efc72c24

Co-authored-by: Daniel Buch Hansen <boogiewasthere@gmail.com>
2023-11-28 07:58:31 +08:00
zeertzjq
718053b7a9
refactor: fix runtime_defs.h (#26259) 2023-11-28 07:47:36 +08:00
dundargoc
6c14ae6bfa refactor: rename types.h to types_defs.h 2023-11-27 21:57:51 +01:00
dundargoc
e3f735ef10 refactor: fix includes for api/autocmd.h 2023-11-27 21:53:07 +01:00
dundargoc
f9231603c4 refactor: fix includes for iconv.h 2023-11-27 21:52:34 +01:00
dundargoc
ab7c0e9904 refactor: create runtime_defs.h 2023-11-27 21:35:21 +01:00
dundargoc
e38a053692 build(IWYU): export generated headers 2023-11-27 19:33:42 +01:00
dundargoc
f4aedbae4c build(IWYU): fix includes for undo_defs.h 2023-11-27 19:33:17 +01:00
dundargoc
8b428ca8b7 build(IWYU): fix includes for func_attr.h 2023-11-27 18:06:57 +01:00
LW
9fa9b3cad9
docs: support @since for api level #25574
close #25416
2023-11-27 08:23:04 -08:00
Dmytro Soltys
72ed99319d fix(treesitter): don't invalidate parser when discovering injections
When parsing with a range, languagetree looks up injections and adds
them if needed. This explicitly invalidates parser, making `is_valid`
report `false` both when including and excluding children.

This is an attempt to describe desired behaviour of `is_valid` in tests,
with what ended up being a single line change to satisfy them.
2023-11-27 15:53:26 +01:00
dundargoc
40139738eb build: enable IWYU on mac 2023-11-27 15:50:45 +01:00
dundargoc
5b765fcab4 ci: fix api-docs workflow
`git diff-index` only works for tracked files, and unchanged
documentation files counts as untracked when shallow cloning.
2023-11-27 14:44:03 +01:00
zeertzjq
38a20dd89f
build(IWYU): replace most private mappings with pragmas (#26247) 2023-11-27 20:58:37 +08:00
zeertzjq
acf5252879
refactor: remove vim.h from more headers (#26244) 2023-11-27 18:37:35 +08:00
zeertzjq
a03bd2b878
test: check vim.wait() error message in fast context (#26242) 2023-11-27 18:24:32 +08:00
dundargoc
2c16c6a6c4
docs: small fixes (#26154) 2023-11-27 17:43:13 +08:00
zeertzjq
574d25642f
refactor: move Arena and ArenaMem to memory_defs.h (#26240) 2023-11-27 17:21:58 +08:00
Lewis Russell
84bbe4b0ca fix(lua): disallow vim.wait() in fast contexts
`vim.wait()` cannot be called in a fast callback since the main loop
cannot be run in that context as it is not reentrant

Fixes #26122
2023-11-27 09:09:21 +00:00
zeertzjq
6343d41436
refactor: move autocmd types to autocmd_defs.h (#26239) 2023-11-27 11:17:04 +08:00
zeertzjq
09541d514d
build(IWYU): replace public-to-public mappings with pragmas (#26237) 2023-11-27 09:51:26 +08:00
zeertzjq
7e2387f41b
build(clint): more precise check for "defs" headers (#26236) 2023-11-27 08:34:06 +08:00
dundargoc
c2a5105e88
build(IWYU): remove arabic_defs.h (#26235)
A _defs header is only needed if it's included by multiple files.
2023-11-27 07:41:43 +08:00
bfredl
3514b26a5d
Merge pull request #26233 from bfredl/strictchar
refactor(encoding): remove redundant vim_isprintc_strict
2023-11-26 22:41:40 +01:00
dundargoc
71141e8cf5 build(IWYU): fix headers for arabic.h 2023-11-26 22:15:53 +01:00
bfredl
a917da4ca5 refactor(encoding): remove redundant vim_isprintc_strict
This function is identical to vim_isprintc when encoding=utf-8 is used
As this is the only internal encoding nvim supports, it is now redundant

ref #2905
2023-11-26 21:53:07 +01:00
Christian Clason
27fc11c048 vim-patch:cf40409e7d17
runtime(nginx): add additional nginx keywords (vim/vim#13581)

* Add support for missing keywords to the nginx syntax plugin

This adds support for several keywords from
- the built-in HTTP/2 module,
- the built-in SSL module,
- the built-in uWSGI module,
- the experimental QUIC branch,
- the third-party SSL CT module,
- the third-party dynamic TLS records patch.

Co-Author: ObserverOfTime <chronobserver@disroot.org>

* Add missing http2/ http3 keywords to nginx plugin

cf40409e7d

Co-authored-by: Chris Aumann <me@chr4.org>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-26 16:17:03 +01:00