Problem: Cannot use a script-local function for 'foldtext'.
Solution: Expand "s:" and "<SID>". (Yegappan Lakshmanan, closesvim/vim#9411)
27708e6c7b
Only port the changes actually related to 'foldtext'.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
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, closesvim/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>
Problem: Callback name argument is changed by setqflist().
Solution: Use the expanded function name for the callback, do not store it
in the argument. (closesvim/vim#11653)
c96b7f5d2a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>
Problem: Cannot use script-local function for setting *func options.
Solution: Use the script context. (Yegappan Lakshmanan, closesvim/vim#9362)
db1a410b61
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: No error when setting a func option to a script-local function.
Solution: Give an error if the name starts with "s:". (closesvim/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>
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.
Problem: Closing split window in other tab may cause a crash.
Solution: Set tp_curwin properly. (Rob Pilling, closesvim/vim#7018)
f3c51bbff1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
* 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
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. (closesvim/vim#8677)
620c959c6c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>
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>
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>
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>
Problem: deletebufline() may move marks in the wrong window.
Solution: Find a window for the buffer being changed. (closesvim/vim#11583)
228e422855
Cherry-pick code change from patch 9.0.0961.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>
Problem: Some source files are too big.
Solution: Move buffer and window related functions to evalbuffer.c and
evalwindow.c. (Yegappan Lakshmanan, closesvim/vim#4898)
261f346f81
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>