Commit Graph

28322 Commits

Author SHA1 Message Date
Christian Clason
7f249936a9 vim-patch:2357765304e4
runtime(netrw): Decode multibyte percent-encoding filename correctly (vim/vim#13842)

Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.

Close vim/vim#13787

2357765304

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-01-12 19:45:15 +01:00
Lewis Russell
4f81f506f9 test: normalise nvim bridge functions
- remove helpers.cur*meths
- remove helpers.nvim
2024-01-12 17:53:27 +00:00
Lewis Russell
c30f2e3182 test: typing for helpers.meths 2024-01-12 13:01:06 +00:00
Christian Clason
061a0d5a48 vim-patch:5f4cc8ea65e8
runtime(colorschemes): Add initial support for Added/Removed/Changed highlight groups (vim/vim#13830)

For some of the colorschemes where diffAdded and diffRemoved were explicitly set up.

5f4cc8ea65

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-01-12 13:52:26 +01:00
Christian Clason
f46ae13685 vim-patch:9.1.0016: default diff highlighting is too noisy
Problem:  default diff highlighting is too noisy
Solution: Link diff highlighting groups to new
          Added/Removed/Changed, revert previous change
          (Romain Lafourcade)

Remove diff* links added in vim/vim#13776 and doc added in commit b1392be

The links added in vim/vim#13776 are way too noisy for the contexts in which
the `diff` syntax is applied (git commits, patches, etc.).

This commit:

- removes those links
- adds new default highlighting groups Added, Changed and
  Removed
- links the diff highlighting groups to those new defaults
- removes the doc changes
- adjusts the syntax_completion test for those newly added group
  names

Note: Changes to the default color schemes will be handled separately,
by adding links to those newly created Added/Removed/Changed
highlighting groups.

related: vim/vim#13776
closes vim/vim#13825

124371c5a1

Co-authored-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
2024-01-12 13:52:26 +01:00
Lewis Russell
284e0ad26d test: use vim.mpack and vim.uv directly 2024-01-12 12:04:20 +00:00
Lewis Russell
56a2ec5c79 test: use vim.inspect directly 2024-01-12 12:04:20 +00:00
Lewis Russell
7a259d01ae test: remove helpers.sleep() 2024-01-12 12:04:19 +00:00
Lewis Russell
d33e1da9b7 test: do not inject vim module into global helpers 2024-01-12 12:04:18 +00:00
zeertzjq
3bcf8e5622
vim-patch:9.1.0011: regexp cannot match combining chars in collection (#26992)
Problem:  regexp cannot match combining chars in collection
Solution: Check for combining characters in regex collections for the
          NFA and BT Regex Engine

Also, while at it, make debug mode work again.

fixes vim/vim#10286
closes: vim/vim#12871

d2cc51f9a1

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-01-12 14:09:10 +08:00
dundargoc
1813661a61 refactor(IWYU): fix headers
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
2024-01-11 21:37:23 +01:00
bfredl
1514982484
Merge pull request #26961 from bfredl/drawend
refactor(screen): simplify grid_clear() and win_draw_end()
2024-01-11 21:20:28 +01:00
bfredl
478b1af511 refactor(screen): simplify grid_clear() and win_draw_end()
grid_put_linebuf() used grid_clear() internally to handle clearing the
left part of a rightleft line. By reimplementing that internally, we
can instead use grid_put_linebuf() as the implementation of
grid_clear(), which in the end is a net reduction of code as grid_fill()
is used for nothing else.

win_draw_end: Implement "draw_margin" on a per-row basis which closer reflects how
terminals work. Also use the magic mirror for 'rightleft'
2024-01-11 19:53:21 +01:00
Lewis Russell
2f9ee9b6cf fix(doc): improve doc generation of types using lpeg
Added a lpeg grammar for LuaCATS and use it in lua2dox.lua
2024-01-11 16:24:12 +00:00
JD
a767c046f4
feat(vim.iter): add Iter:flatten (#26786)
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
2024-01-10 20:57:51 -06:00
zeertzjq
a7550a20e0
fix(pum): handle right-click menu repositioning with multigrid (#26975) 2024-01-10 12:56:43 +08:00
Gregory Anders
fa17a5ab49
fix(terminal): use terminal buffer for TermRequest autocommand (#26974) 2024-01-09 21:31:37 -06:00
Barrett Ruth
63a17322dd
fix(health): improve python executable check error handling (#26954)
Credit to @wookayin for the fix.
2024-01-10 07:05:44 +08:00
Barrett Ruth
c67efe3a9c
fix(health): correctly expand and resolve PYENV_ROOT (#26953) 2024-01-10 06:28:18 +08:00
Christian Clason
595f684c5b vim-patch:71d0ba07a33a
runtime(netrw): Sync with netrw 174b (vim/vim#13836)

* Import netrw v174b
* Revert unwanted changes
* Fix indent
* Revert some changes
* Update tags
* Break long line

71d0ba07a3

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-01-09 23:22:48 +01:00
Famiu Haque
10f36af84d
refactor(options): remove OPT_FREE (#26963)
Problem: `OPT_FREE` macro doesn't seem to do anything as `P_ALLOCED`
already handles allocations.

Solution: Remove `OPT_FREE`.
2024-01-10 06:15:22 +08:00
dundargoc
501cf32357
vim-patch:3a5b3df7764d (#26956)
runtime(tar): fix a few problems with the tar plugin

From: vim/vim#138331:
  - Updating .tar.zst files was broken. Fixes vim/vim#12639.
  - Extracting files from .tar.zst / .tzs files was also broken and
    works now.
From: vim/vim#12637:
  - Fixes variable assignment and typo
From: vim/vim#8109:
  - Rename .tzs to the more standard .tzst

fixes: vim/vim#12639
fixes: vim/vim#8105
closes: vim/vim#8109
closes: vim/vim#12637
closes: vim/vim#13831

3a5b3df776

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
2024-01-10 06:03:09 +08:00
Ghjuvan Lacambre
beca827212
feat(terminal): trigger TermRequest autocommand events (#22159)
This commit implements a new TermRequest autocommand event and has Neovim
emit this event when children of terminal buffers emit an OSC or DCS sequence
libvterm does not handle.

The TermRequest autocommand event has additional data in the
v:termrequest variable.

Co-authored-by: Gregory Anders <greg@gpanders.com>
2024-01-09 08:27:56 -06:00
Jongwook Choi
f40df63bdc fix(docs): make lines not overflow in vim docs
Problem: Some lines in the generated vim doc are overflowing, not
correctly wrapped at 78 characters. This happens when docs body contains
several consecutive 'inline' elements generated by doxygen.

Solution: Take into account the current column offset of the last line,
and prepend some padding before doc_wrap().
2024-01-09 13:33:18 +00:00
zeertzjq
d54156ed08
fix(extmarks): blending space shouldn't overwrite wide char (#26960) 2024-01-09 19:16:44 +08:00
zeertzjq
b2c92eebc0
refactor(drawline): remove unused save_extra argument (#26959) 2024-01-09 14:52:05 +08:00
zeertzjq
ee3d4f6b90
fix(extmarks): handle overwriting right half of wide char (#26951) 2024-01-09 05:37:08 +08:00
bfredl
c4acbb87ba
Merge pull request #26872 from bfredl/fillschar
refactor(options): use schar_T for fillchars and listchars
2024-01-08 18:25:52 +01:00
bfredl
aeb053907d refactor(options): use schar_T representation for fillchars and listchars
A bit big, but practically it was a lot simpler to change over all
fillchars and all listchars at once, to not need to maintain two
parallel implementations.

This is mostly an internal refactor, but it also removes an arbitrary
limitation: that 'fillchars' and 'listchars' values can only be
single-codepoint characters. Now any character which fits into a single
screen cell can be used.
2024-01-08 14:37:55 +01:00
Jongwook Choi
fbe40caa7c docs(treesitter): improve 'no parser' error message for InspectTree
Improve error messages for `:InspectTree`, when no parsers are available
for the current buffer and filetype. We can show more informative and
helpful error message for users (e.g., which lang was searched for):

```
 ... No parser available for the given buffer:
+... no parser for 'custom_ft' language, see :help treesitter-parsers
```

Also improve the relevant docs for *treesitter-parsers*.
2024-01-08 09:27:03 +00:00
James McCoy
367e52cc79
fix(tui): use buflen to calculate remaining buffer size (#26942)
buf is a pointer argument, not a local char array, so sizeof(buf) is just the size of a pointer type on the platform.  This is always an incorrect value, but on 32-bit platforms it actually has an impact, since sizeof(buf) is just 4 and causes the buffer to get truncated.
2024-01-07 12:25:25 -05:00
Gregory Anders
8df3742378
fix(defaults): use augroup for default autocommands (#26933) 2024-01-06 18:08:29 -06:00
Evgeni Chasnovski
9a2c98087b fix(highlight): update IncSearch to link to CurSearch
Problem: `IncSearch` is currently linked to `Search` which makes it not
  usable for its purpose of showing current match with 'incsearch' and
  confirming matches after `:s///c`.

Solution: Link it to `CurSearch`.
2024-01-06 17:42:02 +01:00
James McCoy
9ee8ce2eb8
Merge pull request #26913 from jamessan/execl-fix
fix(test/tui_spec): pass the expected NULL-sentinel to execl()
2024-01-06 09:23:47 -05:00
James McCoy
8861ad83fd
fix(test/tui_spec): pass the expected NULL-sentinel to execl()
Since execl() is a variadic function, it requries a NULL-terminal to
indicate the end of its argument list, c.f. exec(3)

> The first argument, by convention, should point to the filename
> associated with the file being executed.  The list of arguments *must*
> be terminated by a null pointer

This fixes the failure seen on aarch64 and i386, due to garbage data
being considered part of the variadic arguments.
2024-01-06 06:57:31 -05:00
Christian Clason
099bd35a7d docs(luvref): update to version bump 2024-01-06 12:02:27 +01:00
Christian Clason
2eb74bff0e build(deps): bump luv to 1.47.0-0 2024-01-06 12:02:27 +01:00
zeertzjq
28c183b38c
vim-patch:9.1.0014: incorrect use of W_WINROW in edit.c (#26910)
Problem:  incorrect use of W_WINROW in edit.c
Solution: compare against curwin->w_height instead

Remove incorrect use of W_WINROW

In structs.h it is mentioned that w_wrow is relative to w_winrow, so
using W_WINROW doesn't make sense when comparing with window height.

This change won't lead to any observable behavior change:

The condition intends to check if there are 'scrolloff' lines between
the current cursor when the bottom of the window. When W_WINROW(curwin)
is added to curwin->w_height - 1 - get_scrolloff_value(), the condition
is instead satisfied when the cursor is on some screen line below that
position. However,
- If 'scrolloff' is smaller than half the window height, this condition
  can only be satisfied when W_WINROW(curwin) == 0. And if it is not
  satisfied, update_topline() does the actual scrolling.
- If 'scrolloff' is larger than half the window height, update_topline()
  will put the cursor at the center of the window soon afterwards
  anyway, because set_topline() now unsets VALID_TOPLINE flag starting
  from 7db7bb45b0.

To put it in another way, 7db7bb45b0
makes the update_topline() just below correct the mistakes made in this
block, so this incorrect use of W_WINROW() no longer affects observable
behavior.

closes: vim/vim#12331

b1ed7ec9f7
2024-01-06 06:49:21 +08:00
zeertzjq
a18b4af759
Merge pull request #26909 from zeertzjq/vim-9.1.0007
vim-patch:9.1.{0007,0012}: can select empty inner text blocks
2024-01-06 06:45:11 +08:00
zeertzjq
14918118e8 vim-patch:9.1.0012: regression with empty inner blocks introduced
Problem:  regression with empty inner blocks introduced
          (after v9.1.0007)
Solution: Set correct cursor position, Check for visual mode
          being active (Maxim Kim)

relates: vim/vim#13514
closes: vim/vim#13819

3779516988

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-01-06 06:25:37 +08:00
zeertzjq
f38f86b1ad vim-patch:9.1.0007: can select empty inner text blocks
Problem:  can select empty inner text blocks
          (laurentalacoque)
Solution: make selecting empty inner text blocks an error

textobjects: Make selecting inner empty blocks an error

fixes: vim/vim#13514
closes: vim/vim#13523

ad4d7f446d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-01-06 06:24:02 +08:00
James McCoy
52e6059415
fix(test): call separate_arguments() correctly to honor $BUSTED_ARGS (#26905)
separate_arguments() doesn't operate in place on a variable.  It expects
a string argument to parse and stores the results in the specified
variable.
2024-01-05 14:07:34 -05:00
zeertzjq
583c1de175
refactor: move structs from regexp_defs.h to regexp.c (#26899)
These structs are only used in other source files as pointers and their
fields aren't accessed in other source files.
2024-01-05 22:26:07 +08:00
luukvbaal
c509f4907b
fix(column): fill 'statuscolumn' clickdefs with evaluated width (#26891) 2024-01-05 21:34:54 +08:00
zeertzjq
e09adfdcff
fix(terminal): check if mouse on statusline/tabline/winbar/vsep (#26892) 2024-01-05 10:59:52 +08:00
zeertzjq
dab5844082
vim-patch:9.1.0010: Keymap completion is not available (#26888)
Problem:  Keymap completion is not available
Solution: Add keymap completion (Doug Kearns)

Add keymap completion to the 'keymap' option, user commands and builtin
completion functions.

closes: vim/vim#13692

81642d9d6f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-01-05 08:23:51 +08:00
Tristan Partin
88eb0ad149
fix(health): fix tmux RGB capability detection (#26886)
tmux indicates its RGB support via setrgbb and setrgbf. In modern tmux
code, Tc and RGB just set setrgbb and setrgbf, so we can just check for
them.

Link: 7eb496c00c
2024-01-04 15:51:52 -06:00
Lewis Russell
6635ec113f
Merge pull request #26791 from wookayin/gendoc
refactor(gen_vimdoc): general refactoring on vimdoc generation
2024-01-04 12:03:12 +00:00
Luuk van Baal
fa61e0c047 refactor(column): define and use maximum 'statuscolumn' width
Problem:  The maximum 'statuscolumn' width and grow behavior is undocumented.
Solution: Define, use and document the maximum 'statuscolumn' width and grow behavior.
2024-01-04 11:52:37 +00:00
Jaehwang Jung
444f37fe51 fix(decorations): incompletely displayed line should also get decorations 2024-01-04 11:37:00 +00:00