Commit Graph

24210 Commits

Author SHA1 Message Date
zeertzjq
5e97984188 vim-patch:partial:8.2.3908: cannot use a script-local function for 'foldtext'
Problem:    Cannot use a script-local function for 'foldtext'.
Solution:   Expand "s:" and "<SID>". (Yegappan Lakshmanan, closes vim/vim#9411)

27708e6c7b

Only port the changes actually related to 'foldtext'.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-03 08:39:57 +08:00
zeertzjq
9671908c68 vim-patch:8.2.3900: it is not easy to use a script-local function for an option
Problem:    It is not easy to use a script-local function for an option.
Solution:   recognize s: and <SID> at the start of the expression. (Yegappan
            Lakshmanan, closes vim/vim#9401)

8bb65f230d

Omit duplicate docs in fold.txt: removed in a later runtime update.
Cherry-pick test_diffmode.vim changes from patch 8.2.1432.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-03 08:35:13 +08:00
zeertzjq
2ae0d32a72 refactor: make sure getting a callback doesn't modify argument 2022-12-03 08:24:48 +08:00
zeertzjq
10c50d9f30
Merge pull request #21266 from zeertzjq/vim-8.2.3889
vim-patch:8.2.3889,9.0.{0805,0990}
2022-12-03 04:26:00 +08:00
zeertzjq
afb3ff52ec vim-patch:9.0.0990: callback name argument is changed by setqflist()
Problem:    Callback name argument is changed by setqflist().
Solution:   Use the expanded function name for the callback, do not store it
            in the argument. (closes vim/vim#11653)

c96b7f5d2a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 04:05:18 +08:00
zeertzjq
1e6d5fdf3f vim-patch:9.0.0805: filetype autocmd may cause freed memory access
Problem:    Filetype autocmd may cause freed memory access.
Solution:   Set the quickfix-busy flag while filling the buffer.

d0fab10ed2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 03:42:43 +08:00
zeertzjq
70ac0c9358 vim-patch:8.2.3889: duplicate code for translating script-local function name
Problem:    Duplicate code for translating script-local function name.
Solution:   Move the code to get_scriptlocal_funcname(). (Yegappan Lakshmanan,
            closes vim/vim#9393)

e7f4abd38b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-03 03:39:56 +08:00
Christian Clason
07e6296520
Merge pull request #21154 from clason/vimdoc-injections
feat(help): highlighted codeblocks
2022-12-02 16:45:39 +01:00
Christian Clason
e40df8b1bc docs(news): add entry for highlighted code 2022-12-02 16:05:00 +01:00
Christian Clason
0b05bd87c0 docs(gen): support language annotation in docstrings 2022-12-02 16:05:00 +01:00
Christian Clason
9e1187e489 feat(web): syntax highlighting via highlight.js
download from https://highlightjs.org/download/
place `highlight/` directory next to `css/`

style needs adapting for Neovim colors
2022-12-02 16:05:00 +01:00
Christian Clason
952f19ba38 docs: add language annotation to Nvim manual 2022-12-02 16:05:00 +01:00
zeertzjq
7314323420
Merge pull request #21264 from zeertzjq/vim-8.2.3829
vim-patch:8.2.{3829,3838}: cannot use script-local function for setting *func options
2022-12-02 22:10:09 +08:00
zeertzjq
7d10194426 vim-patch:8.2.3838: cannot use script-local function for setting *func options
Problem:    Cannot use script-local function for setting *func options.
Solution:   Use the script context. (Yegappan Lakshmanan, closes vim/vim#9362)

db1a410b61

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-02 21:28:07 +08:00
zeertzjq
1aad5af637 vim-patch:8.2.3829: no error when setting a func option to script-local function
Problem:    No error when setting a func option to a script-local function.
Solution:   Give an error if the name starts with "s:". (closes vim/vim#9358)

94c785d235

Omit test: reverted in patch 8.2.3838.
Cherry-pick SCRIPT_ID_VALID from patch 8.2.1539.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-02 21:28:07 +08:00
Jan Palus
a3f01d32cb
build: restrict git describe to top level source directory (#20993)
fix version determination when building neovim from release tarball
extracted within another git repository
2022-12-02 13:45:37 +01:00
Jonathon
c95a0c9959
fix(diff): fix a crash in diff mode with linematch enabled (#21070)
Problem: With two files open side by side in diff mode and deleting all of the contents of one file, the w_topfill value, which indicates the number of filler lines at the top of the window is set to be a negative number, and it will result in the virtual_lines_passed variable also being negative, and this while loop will run when it shouldn't. While calculating where the cursor and topline should be with linematch enabled, this topfill value is used to put the cursor and top line where it should be in the other windows. If that topfill number is negative, this causes a segfault. 

Solution: Check for positive top fill.
2022-12-02 13:45:00 +01:00
zeertzjq
1145a9b248
feat(aucmd_win): allow crazy things with hidden buffers (#21250)
Problem:    Crash when doing crazy things with hidden buffers.
Solution:   Dynamically allocate the list of autocommand windows.
2022-12-02 20:39:24 +08:00
Christian Clason
805c83f43e
build(deps): bump LuaJIT to HEAD - 564147f51 (#21257) 2022-12-02 10:20:53 +01:00
zeertzjq
86f9e29c86
refactor: remove COMMA (#21260)
It is not needed in Nvim. Ref #6068
2022-12-02 13:10:30 +08:00
kylo252
dcc686a208
test: use luv.os_uname for fast platform detection (#21157) 2022-12-02 12:36:31 +08:00
zeertzjq
facfc88b4c
Merge pull request #21262 from zeertzjq/vim-8.2.1748
vim-patch:8.2.1748: closing split window in other tab may cause a crash
2022-12-02 11:15:47 +08:00
zeertzjq
47d3d0102f vim-patch:8.2.1748: closing split window in other tab may cause a crash
Problem:    Closing split window in other tab may cause a crash.
Solution:   Set tp_curwin properly. (Rob Pilling, closes vim/vim#7018)

f3c51bbff1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-02 10:51:50 +08:00
zeertzjq
982c0053f4 fix(float): make closing float in another tab return to correct window 2022-12-02 10:51:50 +08:00
Mike
61e99217e6
refactor(fs): replace vim.fn/vim.env in vim.fs (#20379)
Avoid using vim.env and vim.fn in vim.fs functions so that
they can be used in "fast" contexts.
2022-12-01 08:15:05 -07:00
dundargoc
adda751407
ci: rename workflow files to be simpler and more consistent (#21253) 2022-12-01 10:55:34 +01:00
Charles Nguyen
1390e97c20
feat(provider): add support for Yarn node modules on Windows (#21246) 2022-12-01 11:50:53 +08:00
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