Bram Moolenaar [Thu, 21 Jan 2021 18:41:16 +0000 (19:41 +0100)]
patch 8.2.2386: Vim9: crash when using ":silent! put"
Problem: Vim9: crash when using ":silent! put".
Solution: When ignoring an error for ":silent!" rewind the stack and skip
ahead to restoring the cmdmod. (closes #7717)
Bram Moolenaar [Wed, 20 Jan 2021 21:22:49 +0000 (22:22 +0100)]
patch 8.2.2380: Vim9: occasional crash when using try/catch and a timer
Problem: Vim9: occasional crash when using try/catch and a timer.
Solution: Save and restore "need_rethrow" when invoking a timer callback.
(closes #7708)
Bram Moolenaar [Tue, 19 Jan 2021 21:48:09 +0000 (22:48 +0100)]
patch 8.2.2377: Vim9: crash when using a range after another expression
Problem: Vim9: crash when using a range after another expression.
Solution: Set the variable type to number. Fix using :put with a range and
the "=" register. (closes #7706)
Bram Moolenaar [Sun, 17 Jan 2021 19:23:38 +0000 (20:23 +0100)]
patch 8.2.2371: Vim9: crash when using types in :for with unpack
Problem: Vim9: crash when using types in :for with unpack.
Solution: Check for skip_var_list() failing. Pass include_type to
skip_var_one(). Skip type when compiling. (closes #7694)
Bram Moolenaar [Thu, 14 Jan 2021 20:57:58 +0000 (21:57 +0100)]
patch 8.2.2352: if focus lost/gained is received twice code is not ignored
Problem: If the focus lost/gained escape sequence is received twice it is
not ignored. (Christ van Willigen)
Solution: Adjust the logic to ignore the escape code.
Bram Moolenaar [Thu, 14 Jan 2021 20:47:06 +0000 (21:47 +0100)]
patch 8.2.2351: Vim9: error msg for "throw" in function called with "silent!"
Problem: Vim9: error message for "throw" in function that was called with
"silent!".
Solution: Do not throw the exception when not caught or displayed.
(closes #7672)
Bram Moolenaar [Thu, 14 Jan 2021 16:35:21 +0000 (17:35 +0100)]
patch 8.2.2345: no focus events in a terminal
Problem: No focus events in a terminal.
Solution: Add the t_fd and t_fe termcap entries and implement detecting
focus events. (Hayaki Saito, Magnus Groß, closes #7673,
closes #609, closes #5526)
Bram Moolenaar [Wed, 13 Jan 2021 19:38:03 +0000 (20:38 +0100)]
patch 8.2.2343: Vim9: return type of readfile() is any
Problem: Vim9: return type of readfile() is any.
Solution: Add readblob() so that readfile() can be expected to always
return a list of strings. (closes #7671)
Bram Moolenaar [Wed, 13 Jan 2021 19:08:38 +0000 (20:08 +0100)]
patch 8.2.2342: "char" functions may return wrong column in Insert mode
Problem: "char" functions return the wront column in Insert mode when the
cursor is beyond the end of the line.
Solution: Compute the column correctly. (Yegappan Lakshmanan, closes #7669)
Bram Moolenaar [Wed, 13 Jan 2021 18:48:46 +0000 (19:48 +0100)]
patch 8.2.2341: expresison command line completion incomplete after "g:"
Problem: Expresison command line completion shows variables but not
functions after "g:". (Gary Johnson)
Solution: Prefix "g:" when needed to a global function.
Bram Moolenaar [Mon, 11 Jan 2021 20:20:18 +0000 (21:20 +0100)]
patch 8.2.2331: Vim9: wrong error when modifying dict declared with :final
Problem: Vim9: wrong error when modifying dict declared with :final.
Solution: Do not check for writable variable when an index follows.
(closes #7657)
Bram Moolenaar [Sun, 10 Jan 2021 21:42:50 +0000 (22:42 +0100)]
patch 8.2.2325: Vim9: crash if map() changes the item type
Problem: Vim9: crash if map() changes the item type.
Solution: Check that the item type is still OK. (closes #7652)
Fix problem with mapnew() on range list.
Bram Moolenaar [Sun, 10 Jan 2021 19:22:54 +0000 (20:22 +0100)]
patch 8.2.2324: not easy to get mark en cursor posotion by character count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes #7648)
Bram Moolenaar [Fri, 8 Jan 2021 19:40:45 +0000 (20:40 +0100)]
patch 8.2.2313: Vim9: using uninitialized field when parsing range
Problem: Vim9: using uninitialized field when parsing range. ":silent!" not
respected when parsing range fails.
Solution: Initialize ea.skip. On pattern failure handle it like an error.
(closes #7636)
Bram Moolenaar [Thu, 7 Jan 2021 21:03:02 +0000 (22:03 +0100)]
patch 8.2.2311: Vim9: cannot assign to variable that shadows command modifier
Problem: Vim9: cannot assign to a variable that shadows a command modifier.
Solution: Check for assignment after possible command modifier.
(closes #7632)
Bram Moolenaar [Thu, 7 Jan 2021 13:45:03 +0000 (14:45 +0100)]
patch 8.2.2307: a shell command in the vimrc causes terminal output
Problem: A shell command in the vimrc causes terminal output.
Solution: Do not call starttermcap() after a shell command if the termcap
wasn't active before.
Bram Moolenaar [Wed, 6 Jan 2021 20:59:39 +0000 (21:59 +0100)]
patch 8.2.2306: Vim9: when using function reference type is not checked
Problem: Vim9: when using function reference type is not checked.
Solution: When using a function reference lookup the type and check the
argument types. (issue #7629)
Bram Moolenaar [Mon, 4 Jan 2021 13:09:43 +0000 (14:09 +0100)]
patch 8.2.2298: Vim9: comment right after "(" of function not recognized
Problem: Vim9: comment right after "(" of function not recognized.
Solution: Do not skip over white space before calling get_function_args().
(closes #7613)
Bram Moolenaar [Mon, 4 Jan 2021 11:42:13 +0000 (12:42 +0100)]
patch 8.2.2295: incsearch does not detect empty pattern properly
Problem: Incsearch does not detect empty pattern properly.
Solution: Return magic state when skipping over a pattern. (Christian
Brabandt, closes #7612, closes #6420)
Bram Moolenaar [Sun, 3 Jan 2021 19:55:26 +0000 (20:55 +0100)]
patch 8.2.2290: Vim9: unlet of global variable cannot be compiled
Problem: Vim9: unlet of global variable cannot be compiled.
Solution: Skip over variables that might be defined later. Give an error if
a subscript is found. (closes #7585)
Bram Moolenaar [Sun, 3 Jan 2021 18:52:05 +0000 (19:52 +0100)]
patch 8.2.2289: Vim9: 'cpo' can become empty
Problem: Vim9: 'cpo' can become empty.
Solution: Use empty_option instead of an empty string. Update quickfix
buffer after restoring 'cpo'. (closes #7608)