Commit Graph
14889 Commits
Author SHA1 Message Date
Kristijan Husak 3f478547cf fix(startup): support .exrc or .nvimrc with init.lua (#21181) 2022-11-26 08:50:52 +08:00
dundargoc 9dfbbde240 docs: fix typos (#21168) 2022-11-26 07:52:30 +08:00
zeertzjqandBram Moolenaar d38da27f1e vim-patch:9.0.0950: the pattern "\_s\zs" matches at EOL (#21192)
Problem:    The pattern "\_s\zs" matches at EOL.
Solution:   Make the pattern "\_s\zs" match at the start of the next line.
            (closes vim/vim#11617)

https://github.com/vim/vim/commit/c96311b5be307f5a1d1b20a0ec930d63964e7335

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-26 07:32:45 +08:00
29b80f6f2e vim-patch:9.0.0935: when using dash it may not be recognize as filetype "sh" (#21174)
* vim-patch:9.0.0935: when using dash it may not be recognize as filetype "sh"

Problem:    When using dash it may not be recognize as filetype "sh".
Solution:   Add checks for "dash". (Eisuke Kawashima,closes vim/vim#11600)

https://github.com/vim/vim/commit/24482fbfd599d2273c48951df7d00d62f3e66c85

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-11-25 10:08:15 +01:00
zeertzjq 2efcb1a7e9 Merge pull request #21188 from zeertzjq/vim-8.2.2684
vim-patch:8.2.{2684,2713}: fold tests
2022-11-25 16:22:39 +08:00
zeertzjqandBram Moolenaar 7875e1377c vim-patch:9.0.0932: Oblivion files are not recognized (#21179)
Problem:    Oblivion files are not recognized.
Solution:   Recognize Oblivion files and alike as "obse". (closes vim/vim#11540)

https://github.com/vim/vim/commit/ecfd511e8d802068434735dda00db6b783df6922

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-25 09:17:30 +01:00
Christian ClasonandMatt Dunford 5ca1f48b40 vim-patch:9.0.0942: Workflow Description Language files are not recognized (#21183)
Problem:    Workflow Description Language files are not recognized.
Solution:   Add a pattern for the "wdl" filetype. (Matt Dunford,
            closes vim/vim#11611)

https://github.com/vim/vim/commit/f60bdc3417a56a1f69e001a7ec210b92d5b0f2e1

Co-authored-by: Matt Dunford <zenmatic@gmail.com>
2022-11-25 09:17:08 +01:00
zeertzjq 84646b80f3 vim-patch:8.2.2713: folding code not sufficiently tested
Problem:    Folding code not sufficiently tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#8064)

https://github.com/vim/vim/commit/68ffe8cade5e0c52680c00cb9f3f87104fbe653a
2022-11-25 15:55:43 +08:00
zeertzjq ba360a26a2 vim-patch:8.2.2684: not enough folding code is tested
Problem:    Not enough folding code is tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#8046)

https://github.com/vim/vim/commit/5c504f680e63120fea36becfabb8d939d4449e34

Reorder test_fold.vim to match upstream.
Cherry-pick Test_fold_expr_error() from patch 8.2.0633.
Cherry-pick syntax feature check from patch 8.2.1432.
Cherry-pick a delete() call from patch 8.2.2112.
2022-11-25 15:50:34 +08:00
zeertzjq 8212bec4e9 vim-patch:8.2.4412: translation cleanup script does not remove empty lines at end
Problem:    Translation cleanup script does not remove empty lines at end.
Solution:   Remove empty lines at the end. (Ken Takata, closes vim/vim#9794)

https://github.com/vim/vim/commit/0257599036ceb3658b27a4de07834ca0d2fa418e
2022-11-25 11:38:31 +08:00
zeertzjqandBram Moolenaar c2a9c64d23 vim-patch:8.2.4155: translating strftime() argument results in check error
Problem:    Translating strftime() argument results in check error.
Solution:   Add gettext comment.

https://github.com/vim/vim/commit/7e93577a957e4f402bb690c4c8629fd831e24a9d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-25 11:35:33 +08:00
zeertzjqandBram Moolenaar 0482f53395 vim-patch:9.0.0936: wrong type for "isunnamed" returned by getreginfo()
Problem:    Wrong type for "isunnamed" returned by getreginfo().
Solution:   Use VAR_BOOL instead of VAR_SPECIAL. (closes vim/vim#11598)

https://github.com/vim/vim/commit/82946e1439d31e86dfeb6166415c73e70475cce2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-25 10:44:43 +08:00
zeertzjqandYegappan Lakshmanan 0d6e1273d6 vim-patch:8.2.2886: various pieces of code not covered by tests
Problem:    Various pieces of code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8255)

https://github.com/vim/vim/commit/34fcb697240c1bc9e69417ed75db3b1a83479724

Nvim does not have test_unknown().

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-25 10:43:08 +08:00
zeertzjqandBram Moolenaar 5bdd787a7a vim-patch:8.2.2466: max() and min() can give many error messages
Problem:    Max() and min() can give many error messages.
Solution:   Bail out at the first error. (closes vim/vim#1039, closes vim/vim#7778)

https://github.com/vim/vim/commit/ab65fc77c5389f7d3f788bbdc3d931561feab131

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-25 10:38:16 +08:00
bfredl 26cba0b17d Merge pull request #21080 from folke/fix_multigrid_lua_ui_attach
fix: don't disable compositor widgets when a GUI with multigrid attaches
2022-11-24 14:19:23 +01:00
zeertzjqandBram Moolenaar a98970219d vim-patch:8.2.4062: match highlighting of tab too short
Problem:    Match highlighting of tab too short.
Solution:   Do not stop match highlighting if on a Tab. (Christian Brabandt,
            closes vim/vim#9507, closes vim/vim#9500)

https://github.com/vim/vim/commit/0bbca540f7377889e2154aa5731f6eeffcb5c0cc

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-24 19:10:00 +08:00
zeertzjqandBram Moolenaar e38ae3b74f vim-patch:8.2.3940: match highlight disappears when doing incsearch for ":s/pat"
Problem:    Match highlight disappears when doing incsearch for ":s/pat".
Solution:   Only use line limit for incsearch highlighting. (closes vim/vim#9425)

https://github.com/vim/vim/commit/94fb8274ca8c93a10102d41c8bcc848f75cb7334

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-24 19:03:23 +08:00
zeertzjqandBram Moolenaar 81c87857f6 vim-patch:8.2.3698: match highlighting continues over breakindent
Problem:    Match highlighting continues over breakindent.
Solution:   Stop before the end column. (closes vim/vim#9242)

https://github.com/vim/vim/commit/0c359af5c0fd106d3f57cc0bb7cef1c89b5e1e10

Cherry-pick Test_matchdelete_redraw() from patch 8.2.1077.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-24 18:52:27 +08:00
zeertzjq 27fceca501 refactor: maybe suppress a PVS warning 2022-11-23 20:03:06 +08:00
zeertzjqandBram Moolenaar 65d95fa415 vim-patch:9.0.0926: Coverity warns for not using return value of dict_add()
Problem:    Coverity warns for not using return value of dict_add().
Solution:   When dict_add() fails then don't call hash_remove().

https://github.com/vim/vim/commit/bc222152d8dea252aa5f1fa24b5536ed269feb92

N/A patches for version.c:

vim-patch:9.0.0927: Coverity warns for using a NULL pointer

Problem:    Coverity warns for using a NULL pointer.
Solution:   Check for memory allocaion failure.

https://github.com/vim/vim/commit/96cbbe29debba25d7eec8d01955c5ac01f5c420d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-23 19:59:43 +08:00
zeertzjq e339376cca vim-patch:9.0.0925: two conditions are always false
Problem:    Two conditions are always false.
Solution:   Remove the conditions.  Update return value types to make clear
            what could be returned. (closes vim/vim#11593)

https://github.com/vim/vim/commit/df3c0eb41e1f48596c85af88b42fed22e3cca328
2022-11-23 19:59:38 +08:00
zeertzjq f1b88ced07 fix(options): fix local 'sidescrolloff' doesn't work for mouse (#21162)
Missing part of Vim patch 8.1.0864.
2022-11-23 12:14:16 +08:00
zeertzjqandBram Moolenaar 4571ba4d0a vim-patch:partial:9.0.0917: the WinScrolled autocommand event is not enough (#21161)
Problem:    The WinScrolled autocommand event is not enough.
Solution:   Add WinResized and provide information about what changed.
            (closes vim/vim#11576)

https://github.com/vim/vim/commit/35fc61cb5b5eba8bbb9d8f0700332fbab38f40ca

Omit "func_name" comment in tv_dict_extend(): Vim9 script only.
Skip layout locking and E1312.
Skip list_alloc_with_items() and list_set_item().

Since this overrides remaining changes in patch 9.0.0913, that patch can
now be marked as fully ported:

vim-patch:9.0.0913: only change in current window triggers the WinScrolled event

N/A patches for version.c:

vim-patch:9.0.0919: build failure with tiny features

Problem:    Build failure with tiny features.
Solution:   Adjust #ifdef's.

https://github.com/vim/vim/commit/9c5b7cb4cf67c64648a324e9dfd1e17d793335a4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-23 09:54:48 +08:00
Christian ClasonandBram Moolenaar d41e93d5a8 vim-patch:9.0.0922: Mermaid files are not recognized (#21160)
Problem:    Mermaid files are not recognized.
Solution:   Add patterns for Mermaid. (Crag MacEachern)

https://github.com/vim/vim/commit/364438d1e817d1d76003695f9ab533df35f8948a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-22 23:28:49 +01:00
bfredl cd386b2c72 Merge pull request #20151 from dundargoc/refactor/char_u/13
refactor: replace char_u with char 13: remove `STRLEN` part 3
2022-11-22 11:02:24 +01:00
dundargoc 7c10774860 refactor: remove old TODO comments that aren't relevant anymore (#21144) 2022-11-22 08:09:33 +08:00
dundargoc 0cbc23d3cc fix: pvs warnings (#21145)
* fix(PVS/V009): start file with special comment

* fix(PVS/V501): identical sub-expressions for comparison

* fix(PVS/V560): part of conditional expression is always true/false

* fix(PVS/V593): review expression of type A = B < C

* fix(PVS/V614): potentially uninitialized variable used
2022-11-22 08:07:45 +08:00
zeertzjqandBram Moolenaar 9b76875235 vim-patch:9.0.0916: getbufline() is inefficient for getting a single line
Problem:    getbufline() is inefficient for getting a single line.
Solution:   Add getbufoneline().

https://github.com/vim/vim/commit/ce30ccc06af7f2c03762e5b18dde37b26ea6ec42

Cherry-pick part of usr_41.txt from patch 8.1.1628.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-22 07:21:26 +08:00
zeertzjqandBram Moolenaar 5836c89ed0 vim-patch:8.2.2479: set/getbufline test fails without the job feature
Problem:    set/getbufline test fails without the job feature.
Solution:   Check whether the job feature is supported. (Dominique Pellé,
            closes vim/vim#7790)

https://github.com/vim/vim/commit/00385114dbd6a3d59516baa02e1ea86a1e7ee70e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-22 07:11:50 +08:00
zeertzjqandBram Moolenaar ef5dfe6c65 vim-patch:8.2.2435: setline() gives an error for some types
Problem:    setline() gives an error for some types.
Solution:   Allow any type, convert each item to a string.

https://github.com/vim/vim/commit/3445320839a38b3b0c253513b125da8298ec27d6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-22 07:11:50 +08:00
zeertzjqandBram Moolenaar 91c192922d vim-patch:9.0.0915: WinScrolled may trigger immediately when defined
Problem:    WinScrolled may trigger immediately when defined.
Solution:   Initialize the fields in all windows. (closes vim/vim#11582)

https://github.com/vim/vim/commit/29967732761d1ffb5592db5f5aa7036f5b52abf1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-20 21:24:22 +08:00
zeertzjqandBram Moolenaar 035d41ac5e vim-patch:partial:9.0.0913: only change in current window triggers the WinScrolled event
Problem:    Only a change in the current window triggers the WinScrolled
            event.
Solution:   Trigger WinScrolled if any window scrolled or changed size.
            (issue vim/vim#11576)

https://github.com/vim/vim/commit/0a60f79fd0c328b47b36279a95282e9f8d9e7512

Skip locking of window layout and E1312.
Copy the latest version of all WinScrolled tests from Vim.
Note: patch 9.0.0915 is needed for the Lua tests to pass.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-20 21:11:37 +08:00
Dundar Göc 40f3f75867 refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-11-19 16:27:10 +01:00
zeertzjqandBram Moolenaar 0958dccc6d vim-patch:8.2.5130: edit test for mode message fails when using valgrind (#21118)
Problem:    Edit test for mode message fails when using valgrind.
Solution:   Use WaitForAssert().  Run beep test later.

https://github.com/vim/vim/commit/c5382b667ac4b69ddff5b5bc562386843bc9c07b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-19 16:39:30 +08:00
zeertzjqandBram Moolenaar c011747b5f vim-patch:8.2.5148: invalid memory access when using expression on command line (#21113)
Problem:    Invalid memory access when using an expression on the command line.
Solution:   Make sure the position does not go negative.

https://github.com/vim/vim/commit/6046aded8da002b08d380db29de2ba0268b6616e

N/A patches for version.c:

vim-patch:8.2.5149: cannot build without the +eval feature

Problem:    Cannot build without the +eval feature. (Tony Mechelynck)
Solution:   Add #ifdefs.

https://github.com/vim/vim/commit/6689df024bce4309ec5884e445738fe07ee4ffcc

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-19 14:12:45 +08:00
zeertzjqandBram Moolenaar 92e51d7e4b vim-patch:8.2.5167: get(Fn, 'name') on funcref returns special byte code (#21112)
Problem:    get(Fn, 'name') on funcref returns special byte code.
Solution:   Use the printable name.

https://github.com/vim/vim/commit/1ae8c262df7083dfb4b41485508951c50eccc84c

Cherry-pick printable_func_name() from patch 8.2.0149.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-19 12:47:44 +08:00
zeertzjq f2b30b4d62 vim-patch:8.2.0260: several lines of code are duplicated (#21108)
Problem:    Several lines of code are duplicated.
Solution:   Move duplicated code to a function. (Yegappan Lakshmanan,
            closes vim/vim#5330)

https://github.com/vim/vim/commit/f4140488c72cad4dbf5449dba099cfa7de7bbb22

Using sizeof seems better than ARRAY_SIZE for vim_snprintf().
2022-11-19 10:57:06 +08:00
zeertzjqandBram Moolenaar a4114f16bf vim-patch:8.2.0469: Vim9: no error for missing ] after list
Problem:    Vim9: no error for missing ] after list.
Solution:   Add error message. Add more tests.

https://github.com/vim/vim/commit/ee619e5bc0992e818f2d9540b093b769b9c27651

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-18 22:30:49 +08:00
zeertzjq fdeb20ddde vim-patch:8.2.0450: not enough testing for restricted mode and function calls
Problem:    Not enough testing for restricted mode and function calls.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5847)

https://github.com/vim/vim/commit/7d941ee032c02a4b682201881eb5c1f1958f17ee
2022-11-18 22:30:47 +08:00
zeertzjqandYegappan Lakshmanan 346c96a33f vim-patch:8.2.4562: linear tag search is not optimal
Problem:    Linear tag search is not optimal.
Solution:   Improve linear tag search performance. (Yegappan Lakshmanan,
            closes vim/vim#9944)

https://github.com/vim/vim/commit/b29b96806f1472371fb3cc01d48394e00b95cfc8

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 20:35:20 +08:00
zeertzjqandYegappan Lakshmanan 6a5fbabe48 vim-patch:8.2.4553: linear tag search is a bit slow
Problem:    Linear tag search is a bit slow.
Solution:   Remove a vim_ftell() call. (Yegappan Lakshmanan, closes vim/vim#9937)

https://github.com/vim/vim/commit/8b530b3158cbd3aee2ad9cad8e7b7964faabb51e

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 20:05:00 +08:00
zeertzjqandBram Moolenaar 30e6cc405f vim-patch:8.2.4544: Coverity warnings for not using returned value
Problem:    Coverity warnings for not using returned value.
Solution:   Assign to vim_ignored.

https://github.com/vim/vim/commit/dbf8094b17781ab1db191cf690e59c79f508a50f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-18 19:41:54 +08:00
zeertzjqandYegappan Lakshmanan b2345ddbf3 vim-patch:8.2.4543: Coverity warning for refactored tag search code
Problem:    Coverity warning for refactored tag search code.
Solution:   Avoid the warnings.  Update comments.  Add one more test case.
            (Yegappan Lakshmanan, closes vim/vim#9928)

https://github.com/vim/vim/commit/20fb28b1dcc092787e1a7b22dcfcfe1e46e29813

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 19:41:54 +08:00
zeertzjqandYegappan Lakshmanan 136112a869 vim-patch:8.2.4538: the find_tags_in_file() function is too long
Problem:    The find_tags_in_file() function is too long.
Solution:   Refactor into smaller functions. (Yegappan Lakshmanan,
            closes vim/vim#9920)

https://github.com/vim/vim/commit/bf40e90dfeb1d3d0280077e65782beb3fee31c9f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 19:41:54 +08:00
zeertzjqandYegappan Lakshmanan e41469a5b5 vim-patch:8.2.4518: the binary tag search feature is always enabled
Problem:    The binary tag search feature is always enabled.
Solution:   Remove the #ifdefs.  Add a few more tests. (Yegappan Lakshmanan,
            closes vim/vim#9893)

https://github.com/vim/vim/commit/655b734ee858e90dd8d28549b7704a71b25d30e7

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 19:41:54 +08:00
zeertzjqandYegappan Lakshmanan 6f08ea0131 vim-patch:8.2.4512: the find_tags_in_file() function is much too long
Problem:    The find_tags_in_file() function is much too long.
Solution:   Refactor into multiple smaller functions. (Yegappan Lakshmanan,
            closes vim/vim#9892)

https://github.com/vim/vim/commit/df1bbea436636ac227d33dd79f77e07f4fffb028

Cherry-pick Test_tag_file_encoding() changes from patch 8.2.1432.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 19:41:53 +08:00
zeertzjq 41c85ac2ef vim-patch:8.2.4496: Coverity gives warnings after tags code refactoring
Problem:    Coverity gives warnings after tags code refactoring.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes vim/vim#9882)

https://github.com/vim/vim/commit/fe9112e630672dcd95e6b384c86f50c27ec10fed
2022-11-18 14:59:18 +08:00
zeertzjqandYegappan Lakshmanan 245035d6db vim-patch:8.2.4494: the find_tags() function is much too long
Problem:    The find_tags() function is much too long.
Solution:   Refactor the function. (Yegappan Lakshmanan, closes vim/vim#9869)

https://github.com/vim/vim/commit/2f87a99b6e9b559d51e130769e7f8377db6749f8

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 14:59:18 +08:00
zeertzjqandBram Moolenaar 282cbc2350 vim-patch:8.2.3776: when a tags file line is long a tag may not be found (#21099)
Problem:    When a tags file line is long a tag may not be found.
Solution:   When increasing the buffer size read the same line again.

https://github.com/vim/vim/commit/f8e9eb8e173bf0ff9560192ae888941ef8302269

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-18 11:16:11 +08:00
Sizhe Zhao ba04fffe98 feat(l10n): update zh_CN translations (#21085) 2022-11-18 08:43:56 +08:00