Bram Moolenaar [Sat, 18 Dec 2021 12:31:33 +0000 (12:31 +0000)]
patch 8.2.3844: Vim9: no type error if assigning func(number) to func(string)
Problem: Vim9: no type error if assigning a value with type func(number) to
a variable of type func(string).
Solution: Use check_type_maybe(): return MAYBE if a runtime type check is
useful. (issue #8492)
Bram Moolenaar [Fri, 17 Dec 2021 20:15:38 +0000 (20:15 +0000)]
patch 8.2.3841: Vim9: outdated TODO items, disabled tests that work
Problem: Vim9: outdated TODO items, disabled tests that work.
Solution: Remove TODO items, run tests that work now. Check that a dict
item isn't locked.
Bram Moolenaar [Thu, 16 Dec 2021 21:07:35 +0000 (21:07 +0000)]
patch 8.2.3831: opfunc test fails when missing feature changes function name
Problem: Opfunc test fails when missing feature changes function name.
(Dominique Pellé)
Solution: Check the relevant screen line instead of using a screendump.
(closes #9360)
Bram Moolenaar [Thu, 16 Dec 2021 18:02:07 +0000 (18:02 +0000)]
patch 8.2.3828: when opening a terminal from a timer first typed char is lost
Problem: when opening a terminal from a timer the first typed character
is lost. (Virginia Senioria)
Solution: When opening a terminal while waiting for a character put K_IGNORE
in the input buffer.
Bram Moolenaar [Thu, 16 Dec 2021 08:21:09 +0000 (08:21 +0000)]
patch 8.2.3822: leaking memory in map() and filter(), no string in Vim9
Problem: Leaking memory in map() and filter(), cannot use a string argument
in Vim9 script.
Solution: Fix the leak, adjust the argument check, also run the tests as
Vim9 script. (Yegappan Lakshmanan, closes #9354)
Bram Moolenaar [Tue, 14 Dec 2021 08:41:38 +0000 (08:41 +0000)]
patch 8.2.3803: GUI: crash with 'writedelay' set using a terminal window
Problem: Crash when 'writedelay' is set and using a terminal window to
execute a shell command.
Solution: Check that "tl_vterm" isn't NULL. (closes #9346)
Bram Moolenaar [Sun, 12 Dec 2021 21:02:03 +0000 (21:02 +0000)]
patch 8.2.3793: using "g:Func" as a funcref does not work in script context
Problem: Using "g:Func" as a funcref does not work in script context
because "g:" is dropped.
Solution: Keep "g:" in the name. Also add parenthesis to avoid confusing
operator prececence. (closes #9336)
ichizok [Sun, 12 Dec 2021 16:42:09 +0000 (16:42 +0000)]
patch 8.2.3789: Test_window_minimal_size can fail on a slow machine
Problem: Test_window_minimal_size can fail on a slow machine.
Solution: Do not rely on timers firing at the expected time. (Ozaki Kiichi,
closes #9335)
Bram Moolenaar [Sun, 12 Dec 2021 14:16:39 +0000 (14:16 +0000)]
patch 8.2.3787: no proper formatting of a C line comment after a statement
Problem: No proper formatting of a C line comment after a statement.
Solution: Find the start of the line comment, insert the comment leader and
indent the comment properly.
Bram Moolenaar [Sat, 11 Dec 2021 16:14:07 +0000 (16:14 +0000)]
patch 8.2.3783: confusing error for using a variable as a function
Problem: Confusing error for using a variable as a function.
Solution: If a function is not found but there is a variable, give a more
useful error. (issue #9310)
Bram Moolenaar [Fri, 10 Dec 2021 21:46:09 +0000 (21:46 +0000)]
patch 8.2.3779: using freed memory when defining a user command recursively
Problem: Using freed memory when defining a user command from a user
command.
Solution: Do not use the command pointer after executing the command.
(closes #9318)
Bram Moolenaar [Fri, 10 Dec 2021 16:55:58 +0000 (16:55 +0000)]
patch 8.2.3775: Vim9: lambda compiled without outer context when debugging
Problem: Vim9: lambda compiled without outer context when debugging.
Solution: When compiling a lambda for debugging also compile it without.
(closes #9302)
Bram Moolenaar [Fri, 10 Dec 2021 12:11:09 +0000 (12:11 +0000)]
patch 8.2.3773: wrong window size when a modeline changes 'columns'
Problem: Wrong window size when a modeline changes 'columns' and there is
more than one tabpage. (Michael Soyka)
Solution: Adjust the frames of all tabpages. (closes #9315)
Bram Moolenaar [Thu, 9 Dec 2021 18:42:57 +0000 (18:42 +0000)]
patch 8.2.3768: timer_info() has the wrong repeat value in a timer callback
Problem: timer_info() has the wrong repeat value in a timer callback.
Solution: Do not add one to the repeat value when in the callback.
(closes #9294)
Bram Moolenaar [Thu, 9 Dec 2021 16:40:18 +0000 (16:40 +0000)]
patch 8.2.3766: converting a funcref to a string leaves out "g:"
Problem: Converting a funcref to a string leaves out "g:", causing the
meaning of the name depending on the context.
Solution: Prepend "g:" for a global function.
Bram Moolenaar [Thu, 9 Dec 2021 10:51:05 +0000 (10:51 +0000)]
patch 8.2.3763: when editing the cmdline a callback may cause a scroll up
Problem: When editing the command line a FocusLost callback may cause the
screen to scroll up.
Solution: Do not redraw at the last line but at the same place where the
command line was before. (closes #9295)
patch 8.2.3762: if quickfix buffer is wiped out getqflist() still returns it
Problem: If the quickfix buffer is wiped out getqflist() still returns its
number.
Solution: Use zero if the buffer is no longer present. (Yegappan Lakshmanan,
closes #9306)
Bram Moolenaar [Wed, 8 Dec 2021 22:13:38 +0000 (22:13 +0000)]
patch 8.2.3761: focus change is not passed on to a terminal window
Problem: Focus change is not passed on to a terminal window.
Solution: If the current window is a terminal and focus events are enabled
send a focus event escape sequence to the terminal.
patch 8.2.3759: quickfix buffer becomes hidden while still in a window
Problem: Quickfix buffer becomes hidden while still in a window.
Solution: Check if the closed window is the last window showing the quickfix
buffer. (Yegappan Lakshmanan, closes #9303, closes #9300)
patch 8.2.3758: options that take a function insufficiently tested
Problem: Options that take a function insufficiently tested.
Solution: Add additional tests and enhance existing tests. (Yegappan
Lakshmanan, closes #9298)
patch 8.2.3751: cannot assign a lambda to an option that takes a function
Problem: Cannot assign a lambda to an option that takes a function.
Solution: Automatically convert the lambda to a string. (Yegappan
Lakshmanan, closes #9286)