Commit Graph

23783 Commits

Author SHA1 Message Date
zeertzjq
5176ed88f6 vim-patch:8.2.2589: recover test hangs in the GUI
Problem:    Recover test hangs in the GUI.
Solution:   Add g:skipped_reason to skip a _nocatch_ test.

776b954622

Now always skip the test as test_override() is N/A.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 20:34:37 +08:00
zeertzjq
1ab08e23b3 vim-patch:8.2.2587: recover test fails on FreeBSD
Problem:    Recover test fails on FreeBSD.
Solution:   Check for Linux.

6635ae1437

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 20:34:37 +08:00
zeertzjq
ec5c1c35c2 vim-patch:8.2.2586: process id may be invalid
Problem:    Process id may be invalid.
Solution:   Use sysinfo.uptime to check for recent reboot. (suggested by Hugo
            van der Sanden, closes vim/vim#7947)

f52f0606ed

test_override() is N/A.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 20:34:33 +08:00
zeertzjq
0a4c5cd2b2
Merge pull request #21087 from zeertzjq/vim-8.2.1970
vim-patch:8.2.{1970,2016,2019,2026,2044,3041,3042}: check if process of swap file is still running
2022-11-17 19:38:57 +08:00
zeertzjq
78998bc6c6 vim-patch:8.2.3042: swap file test fails
Problem:    Swap file test fails.
Solution:   Check for a very high process ID instead of one, which should be
            running.

6738fd2000

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 18:44:26 +08:00
zeertzjq
a8489308ab vim-patch:8.2.3041: detecting if the process of a swap file is running fails
Problem:    Detecting if the process of a swap file is running fails if the
            process is owned by another user.
Solution:   Check for the ESRCH error. (closes vim/vim#8436)

44dea9da4b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 18:44:05 +08:00
zeertzjq
1fe526184f vim-patch:8.2.2044: MS-Windows: swap file test sometimes fails
Problem:    MS-Windows: swap file test sometimes fails.
Solution:   Use a more reliable way to change the process ID. When "timeout"
            fails use "ping" to wait up to ten minutes. (Ken Takata,
            closes vim/vim#7365)

5ee0981fb5
2022-11-17 18:26:20 +08:00
zeertzjq
8cf38c2fd9 vim-patch:8.2.2026: Coverity warns for possibly using not NUL terminated string
Problem:    Coverity warns for possibly using not NUL terminated string.
Solution:   Put a NUL in b0_hname just in case.

e79cdb69a4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 18:24:31 +08:00
zeertzjq
1b95eaf84b vim-patch:8.2.2019: swap file test fails on MS-Windows
Problem:    Swap file test fails on MS-Windows.
Solution:   Add four to the process ID. (Ken Takata, closes vim/vim#7333)

80d868ec25
2022-11-17 18:24:28 +08:00
zeertzjq
f97d88a58a vim-patch:8.2.2016: swap file test is a little flaky
Problem:    Swap file test is a little flaky.
Solution:   Don't set a byte to a fixed value, increment it.

c6ca9f3a29

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 18:24:28 +08:00
zeertzjq
abe1dd308e vim-patch:8.2.1970: it is easy to make mistakes when cleaning up swap files
Problem:    It is easy to make mistakes when cleaning up swap files after the
            system crashed.
Solution:   Warn for the process still running after recovery.  Do not
            automatically delete a swap file created on another system.
            (David Fries, closes vim/vim#7273)

f883508e36
2022-11-17 18:24:21 +08:00
zeertzjq
98bcf49d26
vim-patch:8.2.1260: there is no good test for CursorHold (#21086)
Problem:    There is no good test for CursorHold.
Solution:   Add a test.  Remove duplicated test. (Yegappan Lakshmanan,
            closes vim/vim#6503

7591116acf
2022-11-17 17:34:13 +08:00
Vedant
488e99311f
ci(release/winget): correctly set output variable (#21077) 2022-11-17 09:43:45 +01:00
zeertzjq
6aa5520763
ci(windows): set $PSNativeCommandArgumentPassing = 'Legacy' (#21083)
Ref https://github.com/actions/runner-images/issues/6586

Some runners are using new images, while some others are using old
image. This is the only way I can find that makes it work on both.
2022-11-17 15:57:59 +08:00
zeertzjq
ed27f0e93e
vim-patch:9.0.0300: 'cpoptions' tests are flaky (#21081)
Problem:    'cpoptions' tests are flaky.
Solution:   Use a different file name for each test.

a85e4db978

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 07:51:04 +08:00
Jlll1
fedf002cb3
fix(api): nvim_win_set_cursor redraw cursorcolumn for non-current window (#21072)
fix #19063
this fixes the cursorcolumn not being redrawn for non-current windows in `nvim_win_set_cursor()`
2022-11-17 07:18:31 +08:00
zeertzjq
c404f9b4ba
ci(stale): disable remove-stale-when-updated (#21075)
The needs:response label should only be added and removed manually, and
the action's behavior of removing the label on any activity (e.g. title
change, removing reviewers) is unwanted.
2022-11-16 16:32:05 +01:00
Lewis Russell
fa7e1e2601
fix(api): nvim_buf_get_text regression (#21071) 2022-11-15 21:27:42 +00:00
luukvbaal
fd54194a4f
refactor: convert drawline.c draw states to enum (#21067) 2022-11-15 20:57:30 +00:00
zeertzjq
c70d90dbfd
vim-patch:9.0.0884: mouse shape remains in op-pending mode after failed change (#21066)
Problem:    Mouse shape remains in op-pending mode after failed change.
Solution:   Reset finish_op and restore it. (closes vim/vim#11545)

cdeb65729d
2022-11-15 23:02:48 +08:00
dundargoc
211c568e64
test: don't skip parser_spec on windows (#20294) 2022-11-15 19:33:30 +08:00
bfredl
4b02291f81
Merge pull request #20157 from dundargoc/build/iwyu
build: allow IWYU to fix includes for all .c files
2022-11-15 10:55:07 +01:00
bfredl
c6c265a86c
Merge pull request #21031 from dundargoc/fix/windows
ci(windows): treat compiler warnings as errors
2022-11-15 10:35:25 +01:00
dundargoc
66360675cf build: allow IWYU to fix includes for all .c files
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.

Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
2022-11-15 10:30:03 +01:00
Jlll1
9d2a6cd11e
docs(treesitter): change links for eq? and set! to codeblocks (#21047) 2022-11-15 10:23:56 +01:00
zeertzjq
7439973851
vim-patch:9.0.0882: using freed memory after SpellFileMissing autocmd uses bwipe (#21060)
Problem:    Using freed memory after SpellFileMissing autocmd uses bwipe.
Solution:   Bail out if the window no longer exists.

c3d27ada14

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-15 07:58:22 +08:00
zeertzjq
2685d27cd6
vim-patch:9.0.0883: a silent mapping may cause dots on the command line (#21061)
Problem:    A silent mapping may cause dots on the command line.
Solution:   Don't show dots for completion if they are not going to be removed
            again. (closes vim/vim#11501)

698a00f55d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-15 07:23:57 +08:00
bfredl
4541c45081
Merge pull request #21054 from max397574/fix/deepcopy_vimNIL
fix(lua): make `vim.deepcopy` work with `vim.NIL`
2022-11-14 22:26:22 +01:00
Max
e15f61b1bd fix(lua): make vim.deepcopy work with vim.NIL
style: changed double quotes to single quotes

feat: add tests

fix tests
2022-11-14 21:14:27 +01:00
dundargoc
2755510f78 ci(windows): treat compiler warnings as errors
Reduce the warning level from 3 to 1 and fix all warnings.
2022-11-14 20:17:04 +01:00
Lewis Russell
f8c6718277
feat(lua-api): avoid unnecessary allocations (#19877)
Lua makes (or reuses) an internal copy of strings, so we can safely push
buf pointers onto the stack.
2022-11-14 18:04:36 +00:00
zeertzjq
3060432007
vim-patch:9.0.0878: Coverity warns for dead code (#21053)
Problem:    Coverity warns for dead code.
Solution:   Remove the dead code.

b298fe6cba

Nvim has refactored this function and does not have the dead code.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-14 23:18:25 +08:00
Lewis Russell
e8cc489acc
feat(test): add Lua forms for API methods (#20152) 2022-11-14 10:01:35 +00:00
dundargoc
5c5187c6f8
test: remove skip for 32-bit MSVC (#21030)
We don't support 32-bit windows anymore so it's not needed.
2022-11-14 16:28:30 +08:00
zeertzjq
c4fcde5063
vim-patch:8.2.4038: various code not used when features are disabled (#21049)
Problem:    Various code not used when features are disabled.
Solution:   Add #ifdefs. (Dominique Pellé, closes vim/vim#9491)

748b308eeb

N/A patches for version.c:

vim-patch:8.2.2186: Vim9: error when using 'opfunc'

Problem:    Vim9: error when using 'opfunc'.
Solution:   Do not expect a return value from 'opfunc'. (closes vim/vim#7510)

5b3d1bb0f5
2022-11-14 12:10:26 +08:00
zeertzjq
6d996f78ef
vim-patch:8.2.4001: insert complete code uses global variables
Problem:    Insert complete code uses global variables.
Solution:   Make variables local to the file and use accessor functions.
            (Yegappan Lakshmanan, closes vim/vim#9470)

d94fbfc74a

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-14 11:23:33 +08:00
zeertzjq
f2695919bb
test(old): add missing lines from Vim patch 8.2.0522 (#21048) 2022-11-14 08:16:29 +08:00
zeertzjq
b433acc3c9
vim-patch:9.0.0872: code is indented more than needed (#21046)
Problem:    Code is indented more than needed.
Solution:   Return early. (Yegappan Lakshmanan, closes vim/vim#11538)

623e94e138

Only port the first change to init_history() as Nvim has refactored it.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-14 07:16:42 +08:00
dundargoc
736c36c02f
test: introduce skip() #21010
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.

Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.
2022-11-13 05:52:19 -08:00
bfredl
0a96f18ed7
Merge pull request #21033 from bfredl/winfix
fix(ui): fix some cases of stale highlight definitions
2022-11-13 10:53:59 +01:00
bfredl
d7e7578ada fix(ui): fix some cases of stale highlight definitions
fixes #20695
2022-11-13 10:20:28 +01:00
bfredl
c4f84fc2e2
Merge pull request #20984 from notomo/fix-message-kind-on-history
fix(ui-ext): correct message kind in history before vim.ui_attach()
2022-11-13 09:53:02 +01:00
zeertzjq
9d7dc50628
vim-patch:9.0.0865: duplicate arguments are not always detected (#21036)
Problem:    Duplicate arguments are not always detected.
Solution:   Expand to full path before comparing arguments. (Nir Lichtman,
            closes vim/vim#11505, closes vim/vim#9402)

b3052aa1b5

Co-authored-by: Nir Lichtman <nir@lichtman.org>
2022-11-13 08:35:15 +08:00
zeertzjq
849394e4e2
vim-patch:9.0.0863: col() and charcol() only work for the current window (#21038)
Problem:    col() and charcol() only work for the current window.
Solution:   Add an optional winid argument. (Yegappan Lakshmanan,
            closes vim/vim#11466, closes vim/vim#11461)

4c8d2f02b3

Cherry-pick test_functions.vim change from patch 8.2.0633.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-13 08:29:05 +08:00
zeertzjq
ec449c27fd
vim-patch:9.0.0867: wildmenu redrawing code is spread out (#21035)
Problem:    Wildmenu redrawing code is spread out.
Solution:   Refactor to move code together. (closes vim/vim#11528)

d6e91385f0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-13 08:20:00 +08:00
zeertzjq
e7ba5ba3cd
test(lua/ui_spec): fix Ctrl-C test flakiness (#21039)
Prevent Ctrl-C from flushing the command that starts the prompt.
2022-11-13 08:16:06 +08:00
zeertzjq
f516a9ced7
Merge pull request #21037 from zeertzjq/vim-8.2.4675
vim-patch:8.2.{4675,4676},9.0.0869: no error for missing expression after :elseif
2022-11-13 08:09:21 +08:00
zeertzjq
b251972580 vim-patch:9.0.0869: bogus error when string used after :elseif
Problem:    Bogus error when string used after :elseif.
Solution:   Do not consider a double quote the start of a comment.
            (closes vim/vim#11534)

28c56d5013

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-13 07:30:05 +08:00
zeertzjq
bc1dbebe1f vim-patch:8.2.4676: test fails with different error
Problem:    Test fails with different error.
Solution:   Add argument for :elseif.

292e1b9f68

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-13 07:30:05 +08:00
zeertzjq
2cb0860117 vim-patch:8.2.4675: no error for missing expression after :elseif
Problem:    No error for missing expression after :elseif. (Ernie Rael)
Solution:   Check for missing expression. (closes vim/vim#10068)

fa010cdfb1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-13 07:21:22 +08:00