Commit Graph

20424 Commits

Author SHA1 Message Date
Christian Clason
f378df846c
Merge pull request #17375 from shadmansaleh/fix/vim.g/autoload
fix: autoload variables not loaded with vim.g & nvim_get_var
2022-02-13 10:32:32 +01:00
zeertzjq
6f5fae08a3
Merge pull request #17389 from zeertzjq/restore-oldtests
test(old): add test_cdo.vim and test_packadd.vim
2022-02-13 11:37:49 +08:00
zeertzjq
b16fae0f26 test(old): add test_cdo.vim and test_packadd.vim
test_cdo.vim is copied from Vim v8.1.1483.
test_packadd.vim is copied from Vim v8.2.0174.
2022-02-13 10:26:11 +08:00
zeertzjq
a87eb896a5
Merge pull request #17388 from zeertzjq/test-assert
test(old): move some tests from assert_spec.lua to test_assert.vim
2022-02-13 10:07:09 +08:00
zeertzjq
2a6a93b665 test(old): move some tests from assert_spec.lua to test_assert.vim 2022-02-13 09:23:20 +08:00
Sean Dewar
7a7ac004f0
Merge pull request #17385 from seandewar/vim-8.2.4359
vim-patch:8.2.{4359,4362,4363,4364}: crash when repeatedly using :retab
2022-02-12 22:51:13 +00:00
Sean Dewar
5c62bce7c1
vim-patch:8.2.4364: MS-Windows: still running out of memory for a very long line
Problem:    MS-Windows: still running out of memory for a very long line.
Solution:   Check for negative length.
4549166078
2022-02-12 22:25:39 +00:00
zeertzjq
05f744cfc7
Merge pull request #16643 from zeertzjq/vim-8.1.2184
vim-patch:8.1.2184,8.2.3804: option context is not copied when splitting a window
2022-02-13 06:13:18 +08:00
zeertzjq
dc415ce298 vim-patch:8.1.2184: option context is not copied when splitting a window
Problem:    Option context is not copied when splitting a window. (Daniel
            Hahler)
Solution:   Copy the option context, so that ":verbose set" works.
            (closes vim/vim#5066)
cfb381421f

vim-patch:8.2.3804: script context not set when copying 'swf' and 'ts'

Problem:    Script context not set when copying 'swf' and 'ts'.
Solution:   Use COPY_OPT_SCTX with the right argument. (closes vim/vim#9347)
6206877c51
2022-02-13 05:40:13 +08:00
Sean Dewar
72e3d2c9ba
vim-patch:8.2.4363: MS-Windows: running out of memory for a very long line
Problem:    MS-Windows: running out of memory for a very long line.
Solution:   Use a 32 bit value for MAXCOL also when ints are 64 bits.
8e38555ece

This still fails Vim's Windows CI, so let's see what happens...
2022-02-12 21:38:00 +00:00
zeertzjq
90a43e846d
Merge pull request #17382 from zeertzjq/vim-8.2.2342
vim-patch:8.2.2342: "char" functions may return wrong column in Insert mode
2022-02-13 05:26:15 +08:00
Sean Dewar
700af0ab1d
vim-patch:8.2.4362: :retab may allocate too much memory
Problem:    :retab may allocate too much memory.
Solution:   Bail out when allocating more than MAXCOL bytes.
33f3c59854
2022-02-12 21:23:06 +00:00
shadmansaleh
f292dd2126 fix: autoload variables not loaded with vim.g & nvim_get_var 2022-02-13 01:23:23 +06:00
Christian Clason
f89f4b1e12
Merge pull request #17379 from clason/vim-8.2.4352
vim-patch:8.2.4352: ReScript files are not recognized
2022-02-12 20:10:26 +01:00
Sean Dewar
1b0d6bcd53
vim-patch:8.2.4359: crash when repeatedly using :retab
Problem:    crash when repeatedly using :retab.
Solution:   Bail out when the line is getting too long.
6e28703a8e

Cherry-pick e_resulting_text_too_long from v8.2.3492; put it in globals.h as
it will eventually be used in other files.

Add a modeline to test_retab.vim
2022-02-12 18:52:34 +00:00
Christian Clason
05c3d02380
Merge pull request #17383 from lewis6991/sign_eff
refactor(signs): more efficient signcol calc
2022-02-12 19:40:44 +01:00
Lewis Russell
50250542c3 refactor(signs): more efficient signcol calc
When iterating signs to calculate the sign column, stop iterating when
we reach the maximum configured from 'signcolumn'.
2022-02-12 17:56:39 +00:00
zeertzjq
7db0aa027c
Merge pull request #17381 from zeertzjq/vim-8.2.0580
vim-patch:8.2.0580: window size wrong if 'ea' is off and 'splitright' is on
2022-02-12 21:48:20 +08:00
zeertzjq
ed169d8997 vim-patch:8.2.2342: "char" functions may return wrong column in Insert mode
Problem:    "char" functions return the wront column in Insert mode when the
            cursor is beyond the end of the line.
Solution:   Compute the column correctly. (Yegappan Lakshmanan, closes vim/vim#7669)
9145846b6a
2022-02-12 21:30:28 +08:00
zeertzjq
c23ec9d86e vim-patch:8.2.0580: window size wrong if 'ea' is off and 'splitright' is on
Problem:    Window size wrong if 'ea' is off and 'splitright' is on and
            splitting then closing a window.
Solution:   Put abandoned window space in the right place. (Mark Waggoner)
edd327cc07
2022-02-12 21:19:39 +08:00
bfredl
a1f34b2481
Merge pull request #17377 from clason/keyset-more
feat(highlight): add strikethrough, nocombine to `nvim_set_hl`
2022-02-12 14:05:12 +01:00
Sean Dewar
cc9d08069a
Merge pull request #17269 from seandewar/vim-8.2.0915
vim-patch:8.2.{0915,0918,0922,4355}
2022-02-12 12:28:28 +00:00
James McCoy
e126fbc971
Merge pull request #17376 from dundargoc/ci/reviews/upgrade-to-v6
ci(reviews): upgrade github-script version to v6
2022-02-12 07:09:43 -05:00
James McCoy
dd2c0a7d33
Merge pull request #17371 from dundargoc/revert/continue-on-error
revert: "ci: use continue-on-error instead of "|| true""
2022-02-12 07:08:57 -05:00
Sean Dewar
db06fb47b9
vim-patch:8.2.0922: search test fails
Problem:    Search test fails.
Solution:   Remove failure tests for calls that no longer fail.
48af321a33
2022-02-12 12:01:30 +00:00
Sean Dewar
0511a31ca2
vim-patch:8.2.0918: duplicate code for evaluating expression argument
Problem:    Duplicate code for evaluating expression argument.
Solution:   Merge the code and make the use more flexible.
a9c0104947
2022-02-12 12:01:29 +00:00
Sean Dewar
cdb2c10011
vim-patch:8.2.0915: search() cannot skip over matches like searchpair() can
Problem:    Search() cannot skip over matches like searchpair() can.
Solution:   Add an optional "skip" argument. (Christian Brabandt, closes vim/vim#861)
adc17a5f9d

Enable skip arg usage in autoload/freebasic.vim

evalarg_T doesn't really matter because it's deleted in v8.2.0918 (and
reincarnated for Vim9 script in v8.2.1047), but I found out too late :P Anyway:

- Port evalarg_T into eval.h and use const char * and Callback fields
- Use EVALARG_INIT to initialize
- Return bool over OK/FAIL from evalarg functions
- Remove check from evalarg_clean as callback_free ignores None callbacks anyway
- Move eva_buf field into evalarg_get as a local (not sure what reason it has
  being in the struct)

N/A patches for version.c:

vim-patch:8.2.4355: unnecessary call to check_colorcolumn()

Problem:    Unnecessary call to check_colorcolumn().
Solution:   Remove the call. (Sean Dewar, closes vim/vim#9748)
0f7ff851cb
2022-02-12 12:00:36 +00:00
Christian Clason
cb18545253 feat(api): add strikethrough, nocombine to set_hl 2022-02-12 12:05:41 +01:00
Christian Clason
3b13c7fc8b vim-patch:8.2.4352: ReScript files are not recognized
Problem:    ReScript files are not recognized.
Solution:   Add the *.res and *.resi patterns. (Ananda Umamil, closes vim/vim#9752)
0c3cc2fec3
2022-02-12 12:04:09 +01:00
Dundar Göc
f052e0bd11 ci(reviews): upgrade github-script version to v6 2022-02-12 11:20:00 +01:00
Dundar Göc
0c901baee1 revert: "ci: use continue-on-error instead of "|| true""
This reverts commit 559aa4179c.

I mistakenly believed both ways of writing were equivalent; this is
untrue. Setting continue-on-error to true will make the job pass, but
an error annotation will still be created which is misleading since it's
not actually an error.
2022-02-12 11:03:32 +01:00
James McCoy
a7321e37a7
Merge pull request #17370 from dundargoc/ci/fix-reviews-workflow
ci: fix reviews workflow by sending an artifact with PR number
2022-02-11 20:35:54 -05:00
zeertzjq
f6485e9446
Merge pull request #16841 from zeertzjq/vim-8.1.2073
vim-patch:8.1.2073: when editing a buffer 'colorcolumn' may not work
2022-02-12 07:49:09 +08:00
zeertzjq
4ca522fd02 test: convert some colorcolumn tests to Lua screen tests 2022-02-12 06:36:17 +08:00
zeertzjq
612696bedc vim-patch:8.1.2073: when editing a buffer 'colorcolumn' may not work
Problem:    When editing a buffer 'colorcolumn' may not work.
Solution:   Set the buffer before copying option values. Call
            check_colorcolumn() after copying window options.
010ee9657a
2022-02-12 06:36:17 +08:00
James McCoy
906182065b
Merge pull request #17325 from glacambre/stdioopen_doc 2022-02-11 16:21:16 -05:00
James McCoy
46e0f635da
Merge pull request #17372 from dundargoc/ci/commitlint/fix-revert-bug 2022-02-11 16:16:37 -05:00
Dundar Göc
f50a9a4288 ci(commitlint): allow first non-space character to be a quote 2022-02-11 20:02:50 +01:00
glacambre
8090753880 docs(stdioopen): add missing documentation for on_print param
This commit adds documentation for the feature introduced in #15910.
2022-02-11 19:18:47 +01:00
James McCoy
e3c09cb9ed
Merge pull request #17284 from dundargoc/ci/reduce-noise 2022-02-11 11:12:49 -05:00
Dundar Göc
c373226ee7 ci: disable tracing (set -x) from the shell scripts 2022-02-11 16:53:34 +01:00
Christian Clason
4761dd4fc2
Merge pull request #17365 from kevinhwang91/fix-ts-empty-lines
fix(query.lua): check empty table for lines
2022-02-11 15:19:19 +01:00
Dundar Göc
e957697334 ci: fix reviews workflow by sending an artifact with PR number 2022-02-11 15:12:41 +01:00
Lajos Koszti
f6329ea137
fix(lsp): correct prefix when filterText is present (#17051)
LSP server might return an item which would replace a token to another.
For example in typescript for a `jest.Mock` object `getProductsMock.`
text I get the following response:
```
{
    commitCharacters = {
        ".",
        ",",
        "("
    },
    data = {
        entryNames = {
            "Symbol"
        },
        file = "/foo/bar/baz.service.spec.ts",
        line = 268,
        offset = 17
    },
    filterText = ".Symbol",
    kind = 6,
    label = "Symbol",
    sortText = "11",
    textEdit = {
        newText = "[Symbol]",
        range = {
            end = {
                character = 16,
                line = 267
            },
            start = {
                character = 15,
                line = 267
            }
        }
    }
},
```

In `lsp.omnifunc` to get a `prefix` we call the `adjust_start_col` which
then returns the `textEdit.range.start.character`.
Th `prefix` then be the `.` character. Then when filter the items with
`remove_unmatch_completion_items`, every item will be filtered out,
since no completion word starts `.`.

To fix we return the `end.character`, which in that particular case will
be the position after the `.`.
2022-02-11 14:04:15 +01:00
zeertzjq
b981c231e2
Merge pull request #17368 from zeertzjq/test-filechanged-dialog
test: convert Test_file_changed_dialog() to Lua functional test
2022-02-11 21:02:27 +08:00
kevinhwang91
58d81efcb2 fix: append test for checking zero width node range 2022-02-11 20:59:47 +08:00
zeertzjq
5546492c44 test: convert Test_file_changed_dialog() to Lua functional test 2022-02-11 20:37:20 +08:00
Christian Clason
2db0a52074
Merge pull request #17360 from lewis6991/fix-window-close
fix: close floating windows when calling win_close()
2022-02-11 10:37:13 +01:00
kevinhwang91
afcf64479c fix(query.lua): check empty table for lines
The range of node may make `nvim_buf_get_lines` return an empty table.
2022-02-11 14:44:37 +08:00
zeertzjq
851252f79d
Merge pull request #17012 from EdmundsEcho/fix-checkhealth
prevent checkhealth failure when plugin's check returns void
2022-02-11 05:50:49 +08:00