Commit Graph

7654 Commits

Author SHA1 Message Date
glepnir
985c636aa6 test(ui/popupmenu_spec): add case of hl_group field in complete items
Problem:  Missing test case for hl_group field in complete items.
Solution: Add a test case for hl_group field.
2024-07-27 21:43:38 +08:00
zeertzjq
5be5928771 test(ui/popupmenu_spec): make highlights more consistent 2024-07-27 21:42:31 +08:00
glepnir
bc8a776ef8 vim-patch:9.1.0619: tests: test_popup fails
Problem:  tests: test_popup fails
          (after v9.1.0618)
Solution: Correct test, move combining extra attributes to
          pum_compute_text_attrs() (glepnir)

closes: vim/vim#15353

8754efe437

Co-authored-by: glepnir <glephunter@gmail.com>
2024-07-27 18:10:33 +08:00
glepnir
f132f8e9d4 vim-patch:9.1.0618: cannot mark deprecated attributes in completion menu
Problem:  cannot mark deprecated attributes in completion menu
Solution: add hl_group to the Dictionary of supported completion fields
          (glepnir)

closes: vim/vim#15314

508e7856ec

Co-authored-by: glepnir <glephunter@gmail.com>
2024-07-27 18:05:37 +08:00
zeertzjq
0dfcf3fe12
fix(plines): don't count invalidated virt text in char size (#29863)
Also:
- Remove mt_end() and MT_FLAG_DECOR_VIRT_TEXT_INLINE checks, as they are
  already checked by marktree_itr_check_filter().
- Move ns_in_win() to the last check in decor_redraw_col().
2024-07-26 02:01:12 +00:00
luukvbaal
5af9c065ad
fix(decor): don't draw invalidated virtual lines (#29858) 2024-07-26 09:04:17 +08:00
zeertzjq
41106168a2
vim-patch:8.2.3543: swapname has double slash when 'directory' ends in it (#29862)
Problem:    Swapname has double slash when 'directory' ends in double slash.
            (Shane Smith)
Solution:   Remove the superfluous slash. (closes vim/vim#8876)

8b0e62c93b

The test got lost in #29758...

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-26 00:09:47 +00:00
luukvbaal
dd61be59af
vim-patch:9.1.0617: Cursor moves beyond first line of folded end of buffer (#29859)
Problem:  Cursor moves beyond start of a folded range at the end of a buffer.
Solution: Move cursor to start of fold when going beyond end of buffer.
          Check that cursor moved to detect FAIL in outer cursor function.
          (Luuk van Baal)

dc373d456b
2024-07-26 06:32:54 +08:00
Christian Clason
807eb4434c vim-patch:9.1.0612: filetype: deno.lock file not recognized
Problem:  filetype: deno.lock file not recognized
Solution: detect 'deno.lock' as json filetype
          (カワリミ人形)

Reference:
https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files

closes: vim/vim#15333

df77c8ad39

Co-authored-by: カワリミ人形 <kawarimidoll+git@gmail.com>
2024-07-25 10:01:46 +02:00
Gregory Anders
b02c839414
fix(tui): set id parameter in OSC 8 sequences (#29840)
The id parameter is used to communicate to the terminal that two URLs
are the same. Without an id, the terminal must rely on heuristics to
determine which cells belong together to make a single hyperlink.

See the relevant section in the spec [1] for more details.

[1]: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#hover-underlining-and-the-id-parameter
2024-07-24 09:04:09 -05:00
Christian Clason
862338255d fix(runtime): sync bundled treesitter queries 2024-07-24 16:02:53 +02:00
Gregory Anders
79d492a421
vim-patch:9.1.0610: filetype: OpenGL Shading Language files are not detected (#29831)
Problem:  filetype: OpenGL Shading Language files are not detected
Solution: detect various file extensions as GLSL filetype, include
          indent and syntax script, do no longer recognize '*.comp'
          as Mason filetype (Gregory Anders)

closes: vim/vim#15317

e4b991ed36
2024-07-23 06:28:05 +08:00
bfredl
7381f0a1d5
Merge pull request #29650 from ruuzia/fix_expression_parser_crash
fix: assert failure in VimL expression parser
2024-07-21 16:29:16 +02:00
bfredl
cbb46ac4fa
Merge pull request #28873 from luukvbaal/redraw
fix(api): alloc and draw cursor window in nvim__redraw
2024-07-21 16:04:59 +02:00
Luuk van Baal
89f9f168a5 fix(api): alloc and draw cursor window in nvim__redraw
Problem:  Unable to move cursor to recently opened window.
Solution: Make sure uninitialized window is drawn before trying to move
          the cursor to it.
2024-07-20 14:53:42 +02:00
Luuk van Baal
012db2b0f5 fix(marks): revalidate marks whose position did not change
Problem:  Marks whose position did not change with the action that
          invalidated them (right_gravity = false) are not revalidated
          upon undo.
Solution: Remove early return when restoring a marks saved position so
          that it is still revalidated. Add "move" guards instead.
2024-07-20 14:52:39 +02:00
Christian Clason
2a24d0a435 vim-patch:9.1.0603: filetype: use correct extension for Dracula
Problem:  pattern detection for Dracula language uses "*lvs" and "*lpe".
          as there is no dot, those are not treated as extensions which
          they should (judging by 'runtime/syntax/dracula.vim' and
          common sense).
Solution: use "*.lvs" and "*.lpe" patterns (Evgeni Chasnovski)

closes: vim/vim#15303

5fb801a74f

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2024-07-19 17:28:48 +02:00
zeertzjq
f67a7365af vim-patch:9.1.0602: filetype: Prolog detection can be improved
Problem:  filetype: Prolog detection can be improved
Solution: update the prolog detection regex
          (igna_martinoli)

related: vim/vim#10835
related: vim/vim#15206
closes: vim/vim#15253

37853b7de3

N/A patch:

vim-patch:7347642: runtime(filetype): Fix Prolog file detection regex

Problem: filetype: .pro file detection for Prolog is broken
Solution: fixed the regex to only match on the tested
          cases (igna_martinoli)

fixes: vim/vim#10835
closes: vim/vim#15206

7347642633

Co-authored-by: igna_martinoli <ignamartinoli@protonmail.com>
Co-authored-by: clason <c.clason@uni-graz.at>
2024-07-19 14:42:02 +08:00
zeertzjq
44f871a3cb vim-patch:9.1.0558: filetype: prolog detection can be improved
Problem:  filetype: prolog detection can be improved
Solution: Improved the Prolog file detection regex and added tests for
          all cases. (igna_martinoli)

fixes: vim/vim#10835
closes: vim/vim#15206

50dc83cf92

Only include the tests, as code changes are superseded by later patches.

Co-authored-by: igna_martinoli <ignamartinoli@protonmail.com>
2024-07-19 14:42:02 +08:00
zeertzjq
35b35cb93c
vim-patch:9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit (#29793)
Problem:  Wrong cursor position with 'breakindent' when a double-width
          character doesn't fit in a screen line (mikoto2000)
Solution: Include the width of the 'breakindent' properly.
          (zeertzjq)

fixes: vim/vim#15289
closes: vim/vim#15290

b5d6b5caac
2024-07-19 03:54:42 +00:00
zeertzjq
0b710c8e55
vim-patch:9.1.0599: Termdebug: still get E1023 when specifying arguments (#29794)
Problem:  Termdebug: still get E1023 when specifying arguments and using
          a prompt buffer.
Solution: Use empty() instead of len().  Add a test.  Fix wrong order of
          arguments to assert_equal() in Test_termdebug_basic().
          (zeertzjq)

closes: vim/vim#15288

aef6179bcf
2024-07-19 03:48:13 +00:00
Christian Clason
c69ea53c9d
vim-patch:9.1.0596: filetype: devscripts config files are not recognized (#29773)
Problem:  filetype: Debian devscripts config files are not recognized
Solution: detect devscripts.conf and .devscripts files as sh filetype
          (sourced by /bin/sh)

closes: vim/vim#15227

76c19028ff

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-07-18 07:13:16 +00:00
Rustum Zia
6720bd440f fix: assert failure in VimL expression parser 2024-07-17 23:37:59 -04:00
zeertzjq
185b22720d
vim-patch:9.0.0003: functions are global while they could be local (#29777)
Problem:    Functions are global while they could be local.
Solution:   Add "static".  Add a few tests. (Yegappan Lakshmanan,
            closes vim/vim#10612)

ee47eaceaa

Omit script_name_after_autoload(), untrans_function_name(): Vim9 script
only.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-07-17 23:47:20 +00:00
zeertzjq
286f7ef8a8 vim-patch:partial:8.2.2571: test may leave file behind
Problem:    Test may leave file behind.
Solution:   Delete the temporary file.  Don't profile in the running Vim
            instance.

8c801b374b

This only includes test_quickfix.vim changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 07:00:07 +08:00
zeertzjq
005f6e1076 vim-patch:partial:8.2.1432: various inconsistencies in test files
Problem:    Various inconsistencies in test files.
Solution:   Add modelines where they were missing.  Use Check commands instead
            of silently skipping over tests.  Adjust indents and comments.
            (Ken Takata, closes vim/vim#6695)

6d91bcb4d2

This only includes test_quickfix.vim changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 07:00:04 +08:00
zeertzjq
bbe51ef016
vim-patch:9.1.0594: Unnecessary redraw when setting 'winfixbuf' (#29775)
Problem:  Unnecessary redraw when setting 'winfixbuf'.
Solution: Remove P_RWIN flag. (zeertzjq)

closes: vim/vim#15283

ac4ce9e15b
2024-07-18 06:45:26 +08:00
zeertzjq
457ab65ff3 vim-patch:9.0.1257: code style is not check in test scripts
Problem:    Code style is not check in test scripts.
Solution:   Add basic code style check for test files.

94722c5107

Use Test_test_files() from latest Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 06:18:03 +08:00
zeertzjq
f17d819330 vim-patch:partial:9.0.0719: too many delete() calls in tests
Problem:    Too many delete() calls in tests.
Solution:   Use deferred delete where possible.

56564964e6

This includes all changes expect changes in test_startup.vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 06:18:02 +08:00
Amit Singh
e29f245a10
fix(lsp): inlay hints are rendered in the correct order (#29707)
Problem:
When there are multiple inlay hints present at the same position, they
should be rendered in the order they are received in the response from
LSP as per the LSP spec. Currently, this is not respected.

Solution:
Gather all hints for a given position, and then set it in a single
extmark call instead of multiple set_extmark calls. This leads to fewer
extmark calls and correct inlay hints being rendered.
2024-07-17 16:44:53 +02:00
zeertzjq
bc2bd25f8e
test: fix reporting "no flush received" too early (#29735) 2024-07-17 22:39:25 +08:00
zeertzjq
5d7fd74397
vim-patch:8.1.1588: in :let-heredoc line continuation is recognized (#29767)
Problem:    In :let-heredoc line continuation is recognized.
Solution:   Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580)

e96a2498f9

Nvim already sets may_garbage_collect to false in nv_event(), so the
timer change isn't needed.
Other changes have already been ported.
Also fix incorrect port of test in patch 8.1.1356.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 12:06:59 +00:00
Christian Clason
8e590cae83 vim-patch:9.1.0593: filetype: Asymptote files are not recognized
Problem:  filetype: Asymptote files are not recognized
Solution: detect '*.asy' files as asy filetype, include
          ftplugin and syntax plugin (AvidSeeker).

Reference: https://asymptote.sourceforge.io/

closes: vim/vim#15252

3088ef094d

Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
2024-07-17 11:11:58 +02:00
Christian Clason
61ea466591 vim-patch:9.1.0592: runtime: filetype: Mediawiki files are not recognized
Problem:  filetype: Mediawiki files are not recognized
Solution: detect "*.mw" and "*.wiki" as mediawiki filetype,
          include basic syntax and filetype plugins.
          (AvidSeeker)

closes: vim/vim#15266

b5844104ab

Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
2024-07-17 11:11:58 +02:00
Christian Clason
4a7371c714 vim-patch:9.1.0591: filetype: *.wl files are not recognized
Problem:  filetype: *.wl files are not recognized
Solution: Detect '*.wl' files as Mathematica package files
          (Jonas Dujava)

closes: vim/vim#15269

c6d7dc0393

Co-authored-by: Jonas Dujava <jonas.dujava@gmail.com>
2024-07-17 11:11:58 +02:00
zeertzjq
79002cf438
vim-patch:8.2.2656: some command line arguments and regexp errors not tested (#29761)
Problem:    Some command line arguments and regexp errors not tested.
Solution:   Add a few test cases. (Dominique Pellé, closes vim/vim#8013)

a2b3e7dc92

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 03:33:45 +00:00
zeertzjq
e83949f96c vim-patch:9.0.0414: matchstr() still does not match column offset
Problem:    matchstr() still does not match column offset when done after a
            text search.
Solution:   Only use the line number for a multi-line search.  Fix the test.
            (closes vim/vim#10938)

753aead960

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 11:04:55 +08:00
zeertzjq
ccdbab7810 vim-patch:9.0.0407: matchstr() does match column offset
Problem:    matchstr() does match column offset. (Yasuhiro Matsumoto)
Solution:   Accept line number zero. (closes vim/vim#10938)

75a115e8d6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 11:04:55 +08:00
zeertzjq
dce615bc42 vim-patch:9.0.0228: crash when pattern looks below the last line
Problem:    Crash when pattern looks below the last line.
Solution:   Consider invalid lines to be empty. (closes vim/vim#10938)

13ed494bb5

Comment out the test as it uses Vim9 script and text properties.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 11:04:50 +08:00
zeertzjq
8f890f74b6 test(old): reorder test_regexp_latin.vim to match upstream 2024-07-17 10:50:19 +08:00
zeertzjq
4025c2aa5f
vim-patch:8.2.0281: two placed signs in the same line are not combined (#29757)
Problem:    Two placed signs in the same line are not combined.  E.g. in the
            terminal debugger a breakpoint and the PC cannot be both be
            displayed.
Solution:   Combine the sign column and line highlight attributes.

a2f6e42ded

Nvim already does this in decor_redraw_signs().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 01:20:41 +00:00
luukvbaal
f9a49fab0c
fix(column): modifying a sign should update placed signs (#29750)
Problem:  Modifying a sign no longer updates already placed signs.
Solution: Loop over (newly-exposed) placed decorations when modifying a
          sign definition. Update placed decor if it belongs to the sign
          that is modified.
2024-07-17 08:53:10 +08:00
Maria José Solano
5fe4ce6678
fix(snippet): modify base indentation when there's actually whitespace (#29670) 2024-07-16 19:30:22 +02:00
altermo
118ae7e5ed fix(tohtml): support ranges again 2024-07-16 15:07:40 +02:00
zeertzjq
7e5c5b4d85 vim-patch:8.2.1659: spellfile code not completely tested
Problem:    Spellfile code not completely tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#6929)

96fdf4348a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 15:25:10 +08:00
zeertzjq
10fa9c8039 vim-patch:8.2.1651: spellfile code not completely tested
Problem:    Spellfile code not completely tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#6918)

64e2db6dc6

Fix incorrect spellfile message.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 15:25:10 +08:00
zeertzjq
0bbccf7c5f
vim-patch:8.2.3381: crash when using NULL list with sign functions (#29740)
Problem:    Crash when using NULL list with sign functions.
Solution:   Handle a NULL list like an empty list. (issue vim/vim#8260)

5c56da4de8

Nvim's TV_LIST_ITER_MOD() already checks for NULL.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 15:24:32 +08:00
zeertzjq
e84a4c5a98 vim-patch:9.0.0393: signals test often fails on FreeBSD
Problem:    Signals test often fails on FreeBSD.
Solution:   Use separate files for Suspend and Resume. (Ken Takata,
            closes vim/vim#11065)

a9480dbc8c

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-07-16 14:41:02 +08:00
zeertzjq
a35eda36c3 vim-patch:8.2.5158: TSTP and INT signal tests are not run with valgrind
Problem:    TSTP and INT signal tests are not run with valgrind.
Solution:   Sleep a bit longer. (closes vim/vim#10614)

61e3784819

Cherry-pick Test_signal_TSTP() from patch 8.2.3941.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 14:40:14 +08:00
zeertzjq
76aede1162 vim-patch:8.2.2276: list of distributed files is outdated
Problem:    List of distributed files is outdated.
Solution:   Update the file list.  Minor comment updates.

a72514945b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 14:38:04 +08:00