Commit Graph

26809 Commits

Author SHA1 Message Date
Amaan Qureshi
c6ec7fa8d7 feat(treesitter): add 'injection.self' and 'injection.parent'
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2023-08-24 09:05:44 +09:00
zeertzjq
466c18b818
vim-patch:9.0.1785: wrong cursor position with 'showbreak' and lcs-eol (#24852)
Problem:  wrong cursor position with 'showbreak' and lcs-eol
Solution: Add size of 'showbreak' before when 'listchars' "eol" is used.
          Also fix wrong cursor position with wrapping virtual text on
          empty line and 'showbreak'.

closes: vim/vim#12891

1193951beb
2023-08-24 07:19:18 +08:00
Lewis Russell
dc45fb4655 fix(editorconfig): only warn once on errors 2023-08-23 14:45:02 +01:00
Lewis Russell
32e69bd397 fix(luarc.json): ignore test directory to save memory
Cuts memory usage on startup from 600mb -> 200mb
2023-08-23 14:25:36 +01:00
zeertzjq
08fa71fd27
vim-patch:9.0.1773: cannot distinguish Forth and Fortran *.f files (#24841)
Problem:  cannot distinguish Forth and Fortran *.f files
Solution: Add Filetype detection Code

Also add *.4th as a Forth filetype

closes: vim/vim#12251

19a3bc3add

Don't remove filetype files from Vim patches:
- filetype.vim, script.vim, ft.vim usually contain useful changes
- script.vim and ft.vim don't even have their paths spelled correctly

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-23 19:32:11 +08:00
Lewis Russell
2234b84a1b docs(generators): bake into cmake 2023-08-23 12:16:04 +01:00
Lewis Russell
21152f7905 fix(types): add more annotations to eval.lua 2023-08-23 12:16:04 +01:00
zeertzjq
c2341df64a
Merge pull request #24847 from zeertzjq/vim-9.0.1710
vim-patch:9.0.{1710,1781}
2023-08-23 19:12:01 +08:00
zeertzjq
a1e5cef557 refactor(option.c): move paste_option_changed() into did_set_paste() 2023-08-23 18:24:14 +08:00
zeertzjq
3f32cb88c2 vim-patch:9.0.1781: Problems when setting bin/paste option
Problem:  Problems when setting bin/paste option
Solution: When setting binary/paste, remember that this also affects
          depending options, so that :verbose set returns the right
          location.

Mention if depending options for 'binary' or 'paste' have been reset
indirectly. Add a test to verify it works.

Also noticed as small bug, that the global option value for expandtab
was not reset when paste option is set, so fix that while at it.

closes: vim/vim#12837
closes: vim/vim#12879

757593c07a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-23 18:24:14 +08:00
zeertzjq
0ba27bb51d vim-patch:9.0.1710: scrolloff options work slightly different
Problem: sidescrolloff and scrolloff options work slightly
         different than other global-local options
Solution: Make it behave consistent for all global-local options

It was noticed, that sidescrolloff and scrolloff options behave
differently in comparison to other global-local window options like
'listchars'

So make those two behave like other global-local options. Also add some
extra documentation for a few special local-window options.

Add a few tests to make sure all global-local window options behave
similar

closes: vim/vim#12956
closes: vim/vim#12643

4a8eb6e7a9

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-23 18:24:14 +08:00
zeertzjq
99265d099c
Merge pull request #24844 from zeertzjq/vim-9.0.1783
vim-patch:9.0.1783: Display issues with virt text smoothscroll and showbreak
2023-08-23 13:44:53 +08:00
zeertzjq
908f247c22 fix(plines): count 'showbreak' for virtual text at eol 2023-08-23 13:17:17 +08:00
zeertzjq
a1d71ad55e vim-patch:9.0.1783: Display issues with virt text smoothscroll and showbreak
Problem:  Wrong display with wrapping virtual text or unprintable chars,
          'showbreak' and 'smoothscroll'.
Solution: Don't skip cells taken by 'showbreak' in screen lines before
          "w_skipcol". Combined "n_skip" and "skip_cells".

closes: vim/vim#12597

b557f48982
2023-08-23 13:17:17 +08:00
Christian Clason
3e80b39a8e build(deps): bump luajit to HEAD - 03c31124c
Switch to a rolling release, so the `0-beta3` suffix is dropped in favor
of the date. Remove the custom UNIX command as the symlink is now
created by the LuaJIT Makefile.
2023-08-23 11:23:11 +09:00
zeertzjq
6462ee1c10
vim-patch:9.0.1779: Need more state() tests (#24840)
Problem:  Need more state() tests
Solution: Add a few more tests for operater pending mode and register
          yank command

closes: vim/vim#12883

8dabccd295
2023-08-23 06:42:10 +08:00
zeertzjq
20f76ebf2b
test: fix state() test flakiness (#24839) 2023-08-23 00:00:57 +08:00
zeertzjq
b84a67f50e
vim-patch:9.0.0579: using freed memory when 'tagfunc' wipes out buffer (#24838)
Problem:    Using freed memory when 'tagfunc' wipes out buffer that holds
            'complete'.
Solution:   Make a copy of the option.  Make sure cursor position is valid.

0ff01835a4

Cherry-pick a cmdwin change from patch 9.0.0500.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 22:48:55 +08:00
zeertzjq
e34eb4ccf9
test(old): reorder test_edit.vim to match upstream (#24837) 2023-08-22 20:57:10 +08:00
zeertzjq
63094e0013
vim-patch:8.0.0571: negative line number when using :z^ in an empty buffer (#24836)
Problem:    The cursor line number becomes negative when using :z^ in an empty
            buffer. (neovim vim/vim#6557)
Solution:   Correct the line number.  Also reset the column.

a364cdb648

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 20:56:14 +08:00
zeertzjq
3f1a12b8cc
test(old): remove workaround for TSAN CI (#24834)
Now that TSAN CI no longer runs oldtests, match upstream better.
2023-08-22 20:03:03 +08:00
zeertzjq
94f2da09e1
vim-patch:8.2.4611: typos in tests; one lua line not covered by test (#24835)
Problem:    Typos in tests; one lua line not covered by test.
Solution:   Fix typos. Add test case. (Dominique Pellé, closes vim/vim#9994)

81b573d7e5

Cherry-pick test_menu.vim change from patch 9.0.1453.

N/A patch:
vim-patch:8.2.3045: minor typos

Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
2023-08-22 20:02:50 +08:00
zeertzjq
014b87646f
Merge pull request #24833 from zeertzjq/vim-9.0.0391
vim-patch:9.0.{0380,0391,0415,0425,0428,0837}
2023-08-22 19:10:14 +08:00
zeertzjq
09910d5b35 vim-patch:9.0.0837: append() reports failure when not appending anything
Problem:    append() reports failure when not appending anything.
Solution:   Only report failure when appending something. (closes vim/vim#11498)

cd9c8d400c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 18:56:43 +08:00
zeertzjq
48722ec400 vim-patch:9.0.0428: autocmd test uses common file name
Problem:    Autocmd test uses common file name.
Solution:   Use unique name to reduce flakiness.

be9fc5b60c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 18:56:43 +08:00
zeertzjq
1da705c433 vim-patch:9.0.0425: autocmd test is a bit flaky on MS-Windows
Problem:    Autocmd test is a bit flaky on MS-Windows.
Solution:   Add a bit more sleeping. (Ken Takata, closes vim/vim#11095)

ae04a6049b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 18:56:43 +08:00
zeertzjq
10990eace2 vim-patch:9.0.0415: on MS-Windows some tests are flaky
Problem:    On MS-Windows some tests are flaky.
Solution:   Add sleeps, disable swapfile, mark test as flaky. (Ken Takata,
            closes vim/vim#11082)

0500e87eba

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-08-22 18:56:43 +08:00
zeertzjq
c170708023 vim-patch:9.0.0391: using separate delete() call instead of writefile() 'D' flag
Problem:    Using separate delete() call instead of writefile() 'D' flag.
Solution:   Use the writefile 'D' flag.

3411265a36

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 18:56:43 +08:00
zeertzjq
50b069a8b9 vim-patch:9.0.0380: deleting files in tests is a hassle
Problem:    Deleting files in tests is a hassle.
Solution:   Use the new 'D' flag of writefile().

e1f3ab73bc

vim-patch:e1f3ab73bc7c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 18:56:43 +08:00
github-actions[bot]
898ef1835d
version.c: update [skip ci] (#24830)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2023-08-22 11:15:26 +08:00
Gregory Anders
0fd8eb8aae
fix(terminal): set $COLORTERM unconditionally in :terminal (#24763)
$COLORTERM is set in the terminal emulator based on the value of
'termguicolors' ("truecolor" if &tgc is set, 256 otherwise), but ONLY if
$COLORTERM is also set in the parent terminal emulator.

This is an unnecessary restriction that can cause issues in some cases.
For instance, $COLORTERM is stripped by default by OpenSSH, so is not
present in an SSH session. The terminal emulator still supports 24 bit
color, so the lack of $COLORTERM is not a reliable indicator. When an
application runs in Nvim's :terminal it thus has no way to know whether
or not true color is supported.

Instead, setting it unconditionally based on 'termguicolors' uses the
user's own preferences to infer if 24-bit color is supported, rather
than depending on the (unreliable) presence of $COLORTERM. If
'termguicolors' is set in a terminal that does not support true color
then the colors in Nvim will already look bad. Enabling them for
applications in the terminal emulator will not make it any worse.

If 'termguicolors' is not set then the value of $COLORTERM from the
parent terminal (if any) is forwarded to Nvim's :terminal.

Fixes: https://github.com/neovim/neovim/issues/24717
2023-08-21 13:55:51 -05:00
zeertzjq
d401b33314
fix(terminal): handle horizontal scrolling in another window (#24828) 2023-08-21 23:19:12 +08:00
Gregory Anders
d0717a7c4e
vim-patch:9.0.0423: "for" and "while" not recognized after :vim9cmd and :legacy (#24825)
Problem:    "for" and "while" not recognized after :vim9cmd and :legacy.
            (Emanuele Torre)
Solution:   Recognize all the command modifiers. (closes vim/vim#11087)
            Add a test to check the list of modifiers.

9132426334

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-21 09:06:21 -05:00
zeertzjq
319edce5d0
Merge pull request #24826 from zeertzjq/vim-9.0.0886
vim-patch:9.0.{0886,0902,.0906}: mouse scrolling refactors
2023-08-21 22:06:03 +08:00
zeertzjq
042678a7b4 vim-patch:9.0.0906: mouse scroll code is not optimal
Problem:    Mouse scroll code is not optimal.
Solution:   Properly organise Normal mode, Insert mode and common code.
            (Christopher Plewright, closes vim/vim#11572)

ff95ce0930

Co-authored-by: Christopher Plewright <chris@createng.com>
2023-08-21 21:40:42 +08:00
zeertzjq
1f9878a2e2 vim-patch:9.0.0902: some mouse scroll code is not in a good place
Problem:    Some mouse scroll code is not in a good place.
Solution:   Refactor the code. (Christopher Plewright, closes vim/vim#11561)

696d0a8625

Co-authored-by: Christopher Plewright <chris@createng.com>
2023-08-21 21:40:42 +08:00
zeertzjq
bd3c1c7579 vim-patch:9.0.0886: horizontal mouse scroll only works in the GUI
Problem:    Horizontal mouse scroll only works in the GUI.
Solution:   Make horizontal mouse scroll also work in a terminal.
            (Christopher Plewright, closes vim/vim#11448)

44c2209352

Co-authored-by: Christopher Plewright <chris@createng.com>
2023-08-21 21:40:42 +08:00
Christian Clason
b75659c8fb vim-patch:690963924956
runtime(dosini): save and restore cpo value in syntax script

Commit dd0ad2598898c2b4641c4acd5b70b6184fa698ed  introduced
line-continuation. However, to make sure this does not cause an error
when Vim is run in compatible mode, we need to set compatibility mode
temporarily and reset it back when finished reading the file.

This fixes: https://groups.google.com/g/vim_use/c/9zccgo_RIqM/m/xlUmhBktBgAJ

6909639249

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-21 22:34:48 +09:00
Christian Clason
54ddf56589 vim-patch:6d626c41842e
runtime(sdc): Add underscore to sdc flags in syntax file (vim/vim#6201)

6d626c4184

Co-authored-by: Jordi Altayó <jordialtayo@gmail.com>
2023-08-21 20:32:28 +09:00
Christian Clason
e2d3c1260e vim-patch:a0fddaa2f4b7
Runtime(javascript): add new document properties to completion file

closes: vim/vim#6536

a0fddaa2f4

Co-authored-by: Jay Sitter <jay@diameterstudios.com>
2023-08-21 20:32:28 +09:00
Christian Clason
36404fea4a vim-patch:5e6e4042b1c9
runtime(haskell): Add single quote to `iskeyword` in ftplugin (vim/vim#8191)

The single quote `'` is a valid character in variable names, so it should be included in `iskeyword`; this, for instance, makes the <kbd>*</kbd> command behave predictably

5e6e4042b1

Co-authored-by: Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
2023-08-21 20:32:28 +09:00
Christian Clason
5b78a5c72a vim-patch:309ded19543c
runtime(css): Update pseudo-classes in syntax script (vim/vim#11595)

309ded1954

Co-authored-by: Adrian Heine né Lang <mail@adrianheine.de>
2023-08-21 20:32:28 +09:00
Christian Clason
c9764bf331 vim-patch:9fa35b1c38b8
runtime(lua): fix lua indentation of non-lowercase "keywords" (vim/vim#11759)

9fa35b1c38

Co-authored-by: beardedsakimonkey <54521218+beardedsakimonkey@users.noreply.github.com>
2023-08-21 20:32:28 +09:00
Christian Clason
60037feb56 vim-patch:e71e9d9ad368
runtime(javascript): fix default link of javaScriptNumber in syntax file (vim/vim#11788)

cool unused matching

e71e9d9ad3

Co-authored-by: Meqa <106783764+Meqativ@users.noreply.github.com>
2023-08-21 20:32:28 +09:00
Christian Clason
3f877657dd vim-patch:6633611f4280
runtime(lua): indent curly bracket followed by line comment (vim/vim#12306)

fixes vim/vim#12305

6633611f42

Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
2023-08-21 20:32:28 +09:00
Christian Clason
abc3721e4f vim-patch:478668013f06
runtime(rust): fix rust indent (vim/vim#12542)

478668013f

Co-authored-by: Raphael <glephunter@gmail.com>
2023-08-21 20:32:28 +09:00
Christian Clason
4a36ecd238 vim-patch:72904d5fda0a
Runtime: Add nixInherit matcher in nix.vim syntax

Perform the lookahead in `nixInheritAttributeScope`, then hand over to a
new region called `nixInheritAttributeSubExpr`, which sets the match
start to one char after the opening bracket to avoid a double-match.

Finally, only do a lookahead to `)` in `nixInheritAttributeSubExpr` (and
thus make sure the region is closed to not get a match of `nixParen`
here) and let `nixInheritAttributeScope` close the bracket.

72904d5fda

Co-authored-by: James Fleming <james@electronic-quill.net>
2023-08-21 20:32:28 +09:00
zeertzjq
4a1fb37108
Merge pull request #24820 from zeertzjq/vim-589edb340454
vim-patch:589edb340454,e46a44050562
2023-08-21 17:37:15 +08:00
zeertzjq
6bdfb890fd vim-patch:e46a44050562
Runtime file updates

e46a440505

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-21 17:24:54 +08:00
zeertzjq
0f48173ab5 vim-patch:589edb340454
Updte runtime files

589edb3404

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-21 17:16:10 +08:00