Commit Graph

24183 Commits

Author SHA1 Message Date
zeertzjq
bd2d0edcbf
fix: clang warnings (#21247) 2022-12-01 09:05:25 +08:00
Andrew Willette
282dda643a
fix(ui-ext): log and clear error in ui_comp_event (#21147)
* fix: log and clear error in ui_comp_event

* fix: handling error in each map_foreach_value iteration

* fix: handling error decl in for_each loop

* fix: updating initerr to const, removing initerr free-ing

* fix: using ERROR_SET for error check

* fix: wrapping ERROR_INIT in parens to allow for including inside macro
2022-11-30 21:32:57 +01:00
dundargoc
ef5ab2bf76
ci: add more reviewers based on label (#21155) 2022-11-30 14:19:11 +01:00
zeertzjq
c0d17cec0b
vim-patch:8.2.3259 when 'indentexpr' causes an error did_throw may hang (#21240)
vim-patch:8.2.3259: when 'indentexpr' causes an error did_throw may hang

Problem:    When 'indentexpr' causes an error the did_throw flag may remain
            set.
Solution:   Reset did_throw and show the error. (closes vim/vim#8677)

620c959c6c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 11:47:30 +08:00
zeertzjq
bfdddec8ba
Merge pull request #21238 from zeertzjq/vim-8.2.5080
vim-patch:8.2.{5080,5082,5102,5103,5104,5105,5108}: when indenting gets out of hand it is hard to stop
2022-11-30 10:43:38 +08:00
zeertzjq
22622df950 vim-patch:8.2.5108: retab test disabled because it hangs on MS-Windows
Problem:    Retab test disabled because it hangs on MS-Windows.
Solution:   Also set got_int at the other place a overlong text is detected.

308660bd26

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 10:15:48 +08:00
zeertzjq
e0c7b8955d refactor: move ex_retab() to indent.c 2022-11-30 10:12:28 +08:00
zeertzjq
3f743c39d3 vim-patch:8.2.5105: test still hangs on MS-Windows
Problem:    Test still hangs on MS-Windows.
Solution:   Skip "nocatch" test the right way.

83497f8758

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 10:07:14 +08:00
zeertzjq
b57daafdd9 vim-patch:8.2.5104: test hangs on MS-Windows
Problem:    Test hangs on MS-Windows.
Solution:   Skip another test on MS-Windows.

b31cb04771

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 10:05:26 +08:00
zeertzjq
c180e0d8d5 vim-patch:8.2.5103: build fails with small features
Problem:    Build fails with small features.
Solution:   Add #ifdef.  Skip test on MS-Windows.

34f99584c7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 10:04:24 +08:00
zeertzjq
a7dc48f19d vim-patch:8.2.5102: interrupt not caught in test
Problem:    Interrupt not caught in test.
Solution:   Consider an exception thrown in the current try/catch when got_int
            is set.  Also catch early exit when not using try/catch.

8bea171f15

Cherry-pick test changes from patch 8.2.0557.

bfe13ccc58

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 10:03:37 +08:00
zeertzjq
f706d24045 vim-patch:8.2.5082: retab test fails
Problem:    Retab test fails.
Solution:   Disable the test for now.

9397423985

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 09:47:53 +08:00
zeertzjq
ec52658af7 vim-patch:8.2.5080: when indenting gets out of hand it is hard to stop
Problem:    When indenting gets out of hand it is hard to stop.
Solution:   When line gets too long set got_int.

a7ac4c9c39

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-30 09:47:12 +08:00
zeertzjq
d311c5481d
Merge pull request #21234 from zeertzjq/vim-9.0.0965
vim-patch:9.0.{0965,0966,0967}: using one window for executing autocommands is insufficient
2022-11-29 21:07:29 +08:00
zeertzjq
95f5cf9691 vim-patch:9.0.0967: leaking memory from autocmd windows
Problem:    Leaking memory from autocmd windows.
Solution:   Free window when auc_win is not NULL.

84497cd06f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29 20:36:31 +08:00
zeertzjq
3173d07564 vim-patch:9.0.0965: using one window for executing autocommands is insufficient
Problem:    Using one window for executing autocommands is insufficient.
Solution:   Use up to five windows for executing autocommands.

e76062c078

N/A patches for version.c:

vim-patch:9.0.0966: some compilers don't allow a declaration after a label

Problem:    Some compilers don't allow a declaration after a label.
Solution:   Move the declaration to the start of the block. (John Marriott)

f86490ed4f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29 20:36:31 +08:00
Christian Clason
5093f38c9f feat(help): highlighted codeblocks 2022-11-29 13:32:46 +01:00
zeertzjq
273358651a refactor: buffer_ensure_loaded()
Cherry-picked from Vim patch 8.1.1612.
2022-11-29 20:25:42 +08:00
zeertzjq
89f0987bde
Merge pull request #21232 from zeertzjq/vim-9.0.0910
vim-patch:9.0.{0910,0914}
2022-11-29 17:55:39 +08:00
zeertzjq
05f7d2bade vim-patch:9.0.0914: deletebufline() may move marks in the wrong window
Problem:    deletebufline() may move marks in the wrong window.
Solution:   Find a window for the buffer being changed. (closes vim/vim#11583)

228e422855

Cherry-pick code change from patch 9.0.0961.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29 17:04:19 +08:00
zeertzjq
1282d6d59f vim-patch:9.0.0910: setting lines in another buffer may not work well
Problem:    Setting lines in another buffer may not work well.
Solution:   Make sure the buffer being changed has a window. (issue vim/vim#11558)

c934bfa1b7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29 17:04:15 +08:00
zeertzjq
0b79137c59
vim-patch:8.1.2001: some source files are too big (#21231)
Problem:    Some source files are too big.
Solution:   Move buffer and window related functions to evalbuffer.c and
            evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898)

261f346f81
2022-11-29 16:47:29 +08:00
zeertzjq
98695b4999
vim-patch:8.1.1313: warnings for using localtime() and ctime() (#21229)
Problem:    Warnings for using localtime() and ctime().
Solution:   Use localtime_r() if available.  Avoid using ctime().

63d2555c9c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29 11:48:06 +08:00
zeertzjq
7328c4de54
vim-patch:9.0.0733: use of strftime() is not safe (#21228)
Problem:    Use of strftime() is not safe.
Solution:   Check the return value of strftime().  Use a larger buffer and
            correctly pass the available space. (Dominique Pellé, closes
            vim/vim#11348)

84d14ccdb5

Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
2022-11-29 11:18:15 +08:00
zeertzjq
65e8ed45de
vim-patch:9.0.0969: matchparen highlight is not updated when switching buffers (#21227)
Problem:    Matchparen highlight is not updated when switching buffers.
Solution:   Listen to the BufLeave and the BufWinEnter autocmd events.
            (closes vim/vim#11626)

28a896f54d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29 10:17:57 +08:00
dundargoc
615f124003
docs: fix typos (#21196)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-11-29 09:45:48 +08:00
zeertzjq
0badfaa6d0
test: adding/removing winbar should not cause win_pos events (#21226) 2022-11-29 08:56:41 +08:00
zeertzjq
31eb20d915
Merge pull request #21224 from luukvbaal/vim-9.0.0964
refactor(ui): statusbar invalidation to win_set_inner_size()
2022-11-29 08:53:16 +08:00
Luuk van Baal
6b18c77a27 refactor(ui): statusbar invalidation to win_set_inner_size()
Problem:    w_redr_status invalidation is duplicated in multiple functions
            that all call win_set_inner_size().
Solution:   Move to win_set_inner_size().
2022-11-29 01:14:08 +01:00
Gregory Anders
80b6edabe3
refactor: rework parameter validation in vim.secure.trust() (#21223) 2022-11-28 15:40:50 -07:00
Luuk van Baal
bf0665b3f3 vim-patch:9.0.0964: status line not redrawn when 'splitkeep' is "screen"
Problem:    Status line of other window not redrawn when dragging it when
            'splitkeep' is set to "screen".
Solution:   Set w_redr_status earlier. (Luuk van Baal, closes vim/vim#11635,
            closes vim/vim#11632)

74a694dbe2

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2022-11-28 23:20:19 +01:00
Jlll1
f004812b33
feat(secure): add :trust command and vim.secure.trust() (#21107)
Introduce vim.secure.trust() to programmatically manage the trust
database. Use this function in a new :trust ex command which can
be used as a simple frontend.

Resolves: https://github.com/neovim/neovim/issues/21092
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-11-28 12:23:04 -07:00
dundargoc
77a0f4a542
docs(lua): correct the tags for vim.opt_local and vim.opt_global (#21138) 2022-11-28 18:29:15 +01:00
bfredl
ccd17543f3
Merge pull request #21200 from dundargoc/refactor/char_u/15
refactor: replace char_u with char 15 - remove STRNLEN and STRNCPY
2022-11-28 18:11:41 +01:00
dundargoc
3b96ccf7d3 refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-11-28 14:53:35 +01:00
zeertzjq
b2bb3973d9
vim-patch:9.0.0963: function name does not match autocmd event name (#21215)
Problem:    Function name does not match autocmd event name.
Solution:   Rename "optionsset" to "optionset". (closes vim/vim#11630)

269aa2b29a
2022-11-28 20:01:36 +08:00
zeertzjq
a6f0444ab9
vim-patch:9.0.0958: messages test is flaky (#21205)
Problem:    Messages test is flaky.
Solution:   Add a short delay.

19cf525c20

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-28 06:59:19 +08:00
bfredl
28e6fe85a7
Merge pull request #21204 from bfredl/colormap
fix(tests): only get the color map once, even for multiple test files
2022-11-27 23:30:49 +01:00
bfredl
942f26279d fix(tests): only get the color map once, even for multiple test files
Problem: test/functional/ui/screen.lua would be reloaded for each
*_spec.lua file, which causes an extra nvim session to be started
to get the color map each time.

solution: Mark screen.lua as a preloaded file, but defer the
loading of the color map to the first time Screen object is initialised.
2022-11-27 11:51:10 +01:00
zeertzjq
3098064f33
vim-patch:9.0.0953: part of making search more efficient is missing (#21201)
Problem:    Part of making search more efficient is missing.
Solution:   Add the change in searchit().

837ca8f43b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-27 07:19:52 +08:00
bfredl
019c8805e5
Merge pull request #20196 from dundargoc/refactor/char_u/14
refactor: replace char_u with char 14: remove `STRLEN` part final
2022-11-26 18:58:45 +01:00
Dundar Göc
bd22585061 refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-11-26 15:52:21 +01:00
Christian Clason
319fbffc94
vim-patch:9.0.0952: Eclipse preference files are not recognized (#21199)
Problem:    Eclipse preference files are not recognized.
Solution:   Add a pattern to use "jproperties" for Eclipse preference files.
            (closes vim/vim#11618)

f3f198b634

Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2022-11-26 14:35:40 +01:00
zeertzjq
7e9981d246
vim-patch:9.0.0951: trying every character position for a match is inefficient (#21198)
Problem:    Trying every character position for a match is inefficient.
Solution:   Use the start position of the match ignoring "\zs".

01105b37a1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-26 21:28:47 +08:00
zeertzjq
84465a8c15
vim-patch:8.2.1707: small inconsitency in highlight test (#21193)
Problem:    Small inconsitency in highlight test.
Solution:   Use one argument for :execute. (Antony Scriven, vim/vim#6975)

2bbada8116
2022-11-26 11:15:27 +08:00
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
zeertzjq
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)

c96311b5be

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-26 07:32:45 +08:00
Christian Clason
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)

24482fbfd5

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