Commit Graph

16962 Commits

Author SHA1 Message Date
Luki446
5ca6c9e046 fix(terminal): make backslashes in 'shell' work on Windows
If backslashes are used in 'shell' option, escape them to make Terminal
mode work.
2023-11-30 07:32:28 +08:00
zeertzjq
86cc791deb
refactor: move function macros out of vim_defs.h (#26300) 2023-11-29 23:10:21 +08:00
zeertzjq
a6cba103ce
refactor: move some constants out of vim_defs.h (#26298) 2023-11-29 20:32:40 +08:00
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
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
dundargoc
79b6ff28ad refactor: fix headers with IWYU 2023-11-28 22:23:56 +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
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
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
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
dundargoc
40139738eb build: enable IWYU on mac 2023-11-27 15:50:45 +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
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
zeertzjq
6361806aa2
refactor: move garray_T to garray_defs.h (#26227) 2023-11-26 22:58:52 +08:00
dundargoc
34509bbea3
build: sync IWYU and clint to ignore the same headers (#26228)
Also fix headers for autocmd.c.
2023-11-26 22:34:29 +08:00
dundargoc
ce6075f82a build: add check to clint to prevent non-defs header includes
Also enable iwyu on headers, but add an ignore for each file separately.

Work on https://github.com/neovim/neovim/issues/6371.
2023-11-26 15:06:51 +01:00
dundargoc
17d81ac2ab build(IWYU): map everything in the C99 specification 2023-11-26 12:13:25 +01:00
dundargoc
a827003e30 build: rework IWYU mapping files
Create mapping to most of the C spec and some POSIX specific functions.
This is more robust than relying files shipped with IWYU.
2023-11-25 17:41:33 +01:00
zeertzjq
ee276f8758
vim-patch:8.2.4685: when a swap file is found for a popup there is no dialog (#26207)
Problem:    When a swap file is found for a popup there is no dialog and the
            buffer is loaded anyway.
Solution:   Silently load the buffer read-only. (closes vim/vim#10073)

188639d75c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-11-25 10:50:51 +08:00
luukvbaal
6a2a37b1e1
fix(mouse): avoid dragging when clicking next to popupmenu (#26201) 2023-11-25 07:10:19 +08:00
zeertzjq
53cc835b51
refactor(tui): remove unnecessary scheduling when suspending (#26190)
Nvim no longer calls loop_poll_events() when suspending, so it isn't
necessary to schedule suspend_event.
2023-11-24 11:31:07 +08:00
zeertzjq
55dbf5c379
fix(messages): validate msg_grid before using msg_grid_pos (#26189) 2023-11-24 10:44:19 +08:00