Commit Graph

23809 Commits

Author SHA1 Message Date
zeertzjq
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)

2f87a99b6e

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-18 14:59:18 +08:00
zeertzjq
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.

f8e9eb8e17

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
zeertzjq
790d12b95f
fix(ex_cmds): fix a mistake in the porting of Vim patch 8.1.0306 (#21096) 2022-11-18 08:14:17 +08:00
Matthew Gramigna
523b1943c3
vim-patch:9.0.0897: Clinical Quality Language files are not recognized (#21094)
Problem:    Clinical Quality Language files are not recognized.
Solution:   Add the "*.cql" pattern. (Matthew Gramigna, closes vim/vim#11452)

12babe45a3

Co-authored-by: mgramigna <mgramigna@mitre.org>
2022-11-18 00:39:31 +01:00
zeertzjq
510429fc5c
vim-patch:8.2.1497: CursorHold test is flaky (#21095)
Problem:    CursorHold test is flaky. (Jakub Kądziołka)
Solution:   Use WaitForAssert() (closes vim/vim#6754)

17f67547f3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-18 06:47:51 +08:00
bfredl
7b158e766b
Merge pull request #21078 from dundargoc/refactor/remove-wint
refactor: remove __STDC_ISO_10646__ check
2022-11-17 21:20:11 +01:00
zeertzjq
1f6d36c2c4
Merge pull request #21090 from zeertzjq/vim-8.2.2945
vim-patch:8.2.{2945,2952,2960,2973,2981,3080,3103,3440,3498},9.0.0895: recover tests
2022-11-17 23:53:58 +08:00
Gregory Anders
32cba4cee6
Merge pull request #20956 from gpanders/lua-readsecure
feat: implement vim.secure.read() and use it for 'exrc'
2022-11-17 08:47:41 -07:00
zeertzjq
4b7aafc2f4 fix(memline): use long instead of linenr_T for db_line_count 2022-11-17 23:30:56 +08:00
zeertzjq
7139035bfd vim-patch:9.0.0895: file renamed twice in test, missing feature check
Problem:    File renamed twice in test; missing feature check.
Solution:   Remove a rename() call.  Add check for cryptv feature.
            (closes vim/vim#11564)

780154bf7a

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-11-17 23:30:56 +08:00
Gregory Anders
6d9c3d903e refactor: deprecate 'secure' option
Now that 'exrc' files must be explicitly marked trusted there is no need
to constrain what can be done in them.
2022-11-17 08:23:41 -07:00
Gregory Anders
294910a1ff feat(exrc): use vim.secure.read() for 'exrc' option 2022-11-17 08:23:41 -07:00
Gregory Anders
f1922e78a1 feat: add vim.secure.read()
This function accepts a path to a file and prompts the user if the file
is trusted. If the user confirms that the file is trusted, the contents
of the file are returned. The user's decision is stored in a trust
database at $XDG_STATE_HOME/nvim/trust. When this function is invoked
with a path that is already marked as trusted in the trust database, the
user is not prompted for a response.
2022-11-17 08:23:41 -07:00
dundargoc
51a48d482e refactor: remove __STDC_ISO_10646__ check
We can always assume wchar_t values are unicode codepoints for the
systems we support, so this check isn't necessary.
2022-11-17 16:12:34 +01:00
zeertzjq
c269b8dcae vim-patch:8.2.3498: recover test may fail on some systems
Problem:    Recover test may fail on some systems.
Solution:   Adjust the little endian and 64 bit detection. (James McCoy,
            closes vim/vim#8941)

37f341d723

Co-authored-by: James McCoy <jamessan@jamessan.com>
2022-11-17 23:03:31 +08:00
zeertzjq
d8fc390bd0 vim-patch:8.2.3440: recover test fails if there is an old swap file
Problem:    Recover test fails if there is an old swap file.
Solution:   Delete old swap files.

f2a8bafa4b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 23:02:59 +08:00
zeertzjq
acfc3d54c6 vim-patch:8.2.3103: swap test may fail on some systems
Problem:    Swap test may fail on some systems when jobs take longer to exit.
Solution:   Use different file names.

f33cae6050

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-17 23:02:26 +08:00
zeertzjq
c1c2c7b316 vim-patch:8.2.3080: recover test fails on 32bit systems
Problem:    Recover test fails on 32bit systems. (Ondřej Súkup)
Solution:   Detect 32/64 bit systems. (Yegappan Lakshmanan, closes vim/vim#8485,
            closes vim/vim#8479)

576cb75ceb

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-17 23:01:09 +08:00
zeertzjq
fa17dc1e1b vim-patch:8.2.2981: recovery test is not run on big-endian systems
Problem:    Recovery test is not run on big-endian systems.
Solution:   Make it work on big-endian systems. (James McCoy, closes vim/vim#8368)

6654ca702c

Co-authored-by: James McCoy <jamessan@jamessan.com>
2022-11-17 23:00:43 +08:00
zeertzjq
f12a45c45e vim-patch:8.2.2973: fix for recovery and diff mode not tested
Problem:    Fix for recovery and diff mode not tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8352)

3044324e8d

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-17 22:59:33 +08:00
zeertzjq
a8f54a94c1 vim-patch:8.2.2960: swap file recovery not sufficiently tested
Problem:    Swap file recovery not sufficiently tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8339)

8cf02e5cf8

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-17 22:56:39 +08:00
zeertzjq
442a7e89b8 vim-patch:8.2.2952: recover test fails on big endian systems
Problem:    Recover test fails on big endian systems.
Solution:   Disable the failing test on big endian systems. (Yegappan
            Lakshmanan, closes vim/vim#8335)

99285550a9

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-17 22:53:24 +08:00
zeertzjq
3f75f25f9c vim-patch:8.2.2945: some buffer related code is not tested
Problem:    Some buffer related code is not tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8320)

59b262362f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-17 22:45:14 +08:00
zeertzjq
9736605672
Merge pull request #21089 from zeertzjq/vim-8.2.2586
vim-patch:8.2.{2586,2587,2589}: process id may be invalid
2022-11-17 22:38:39 +08:00
zeertzjq
a77be32cf9 test: add a Lua test for swap file created before boot
Change the file modification time instead of uptime.
2022-11-17 22:17:48 +08:00
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