Problem: No test for dragging a tab with the mouse and for creating a new
tab by double clicking in the tabline.
Solution: Add two tests. (Dominique Pelle, closesvim/vim#4258)
e3e3828f93
Set 'mousetime' to 0 instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for closing tab by click in tabline.
Solution: Add a test. Also fix that dragging window separator could fail in
a large terminal. (Dominique Pelle, closesvim/vim#4253)
39f76c6ac0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for mouse clicks in the terminal tabpage line.
Solution: Add a test. (Dominique Pelle, closesvim/vim#4247). Also init
TabPageIdxs[], in case it's used before a redraw.
ca57ab54d7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Termcodes test would fail in a very big terminal.
Solution: Bail out when the row is larger than what will work. (Dominique
Pelle, closesvim/vim#4246)
c8b3ddab51
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Code for modeless selection not sufficiently tested.
Solution: Add tests. Move mouse code functionality to a common script file.
(Yegappan Lakshmanan, closesvim/vim#5821)
Add some mouse.vim functions that can be made to work in Nvim.
515545e11f
Problem: Crash when recovering from corrupted swap file.
Solution: Bail out when the line index looks wrong. (closesvim/vim#12276)
bf1b713202
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Popup menu position wrong in window with toolbar.
Solution: Take the window toolbar into account when positioning the popup
menu. (closesvim/vim#12308)
4e1ca0d9a6
Fixed in the previous commit. Test only.
Problem: Using uninitialized memory when argument is missing.
Solution: Check there are sufficient arguments before the base.
(closesvim/vim#12302)
b7f2270bab
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: The ModeChanged event may be triggered too often.
Solution: Only trigger ModeChanged when no operator is pending.
(closesvim/vim#12298)
73916bac5a
Problem: no functions for converting from/to UTF-16 index.
Solution: Add UTF-16 flag to existing funtions and add strutf16len() and
utf16idx(). (Yegappan Lakshmanan, closesvim/vim#12216)
67672ef097
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Error message for wrong argument type is not specific.
Solution: Include more information in the error. (Yegappan Lakshmanan,
closesvim/vim#11037)
8deb2b30c7
Skip reduce() and deepcopy() changes because of missing patches.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Using freed memory when executing delfunc at the more prompt.
Solution: Check function list not changed in another place. (closesvim/vim#11437)
398a26f7fc
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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.
(closesvim/vim#9294)
95b2dd0c00
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot get the first screen column of a character.
Solution: Let virtcol() optionally return a list. (closesvim/vim#10482,
closesvim/vim#7964)
0f7a3e1de6
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Problem: Checks for Dictionary argument often give a vague error message.
Solution: Give a useful error message. (Yegappan Lakshmanan, closesvim/vim#11009)
04c4c5746e
Cherry-pick removal of E922 from docs from patch 9.0.1403.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.1478: filetypes for *.v files not detected properly
Problem: Filetypes for *.v files not detected properly.
Solution: Use the file contents to detect the filetype. (Turiiya,
closesvim/vim#12281)
80406c2618
Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com>
Co-authored-by: Jonas Strittmatter <40792180+smjonas@users.noreply.github.com>
Problem: Lines put in non-current window are not displayed. (Marius
Gedminas)
Solution: Don't increment the topline when inserting just above it.
(closesvim/vim#12212)
e7f05a8780
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: ":drop fname" may change the last used tab page.
Solution: Restore the last used tab page when :drop has changed it.
(closesvim/vim#12087)
8281a16efc
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Profile completion test sometimes fails.
Solution: Delete the .res file before running tests.
7e0be3ea21
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Deferred functions invoked in unexpected order when using :qa and
autocommands.
Solution: Call deferred functions for the current funccal before using the
stack. (closesvim/vim#12278)
1be4b81bfb
Problem: Jenkinsfiles are not recognized as groovy.
Solution: Add a pattern for Jenkinsfiles. (closesvim/vim#12236)
142ffb024d
Co-authored-by: dundargoc <gocdundar@gmail.com>
Problem: Reporting swap file when windows are split.
Solution: Close extra windows after running a test.
e5eae82bb7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Tests call GetSwapFileList() before it is defined.
Solution: Move the call to after defining the function. (Christopher
Plewright)
6572a90287
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Tests may get stuck in buffer with swap file.
Solution: Bail out when bwipe! doesn't get another buffer.
fa2533c8bb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Stray warnings for existing swap files.
Solution: Wipe out the buffer until it has no name and no swap file.
23526d2539
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Test for catch after interrupt is flaky on MS-Windows.
Solution: Mark the test as flaky.
72b5b0d51a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Test for swapfilelist() fails on MS-Windows.
Solution: Only check the tail of the path. Mark a test as flaky.
6cf3151f0e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: There is no way to get a list of swap file names.
Solution: Add the swapfilelist() function. Use it in the test script to
clean up. Remove deleting individual swap files.
c216a7a21a
vim-patch:9.0.1005: a failed test may leave a swap file behind
Problem: A failed test may leave a swap file behind.
Solution: Delete the swap file to avoid another test to fail. Use another
file name.
d0f8d39d20
Cherry-pick test_window_cmd.vim changes from patch 8.2.1593.
Remove FUNC_ATTR_UNUSED from eval functions as fptr is always unused.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: When a test gets stuck it just hangs forever.
Solution: Set a timeout of 30 seconds.
3bcd0ddc2d
Note: This doesn't cause test_timers.vim failures in Nvim because there
is a SetUp() function that calls timer_stopall().
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Elapsed time since testing started is not visible.
Solution: Show the elapsed time while running tests.
b9093d5009
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: When a test is slow and CI times out there is no time info.
Solution: Add the elapsed time to the "Executing" message.
daaa3d9965
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Terminal test sometimes hangs.
Solution: Add a bit more information to the test output. (issue vim/vim#11179)
a22c56a59a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: MS-Windows: "%T" time format does not appear to work.
Solution: Use "%H:%M:%S" instead.
5fbbec180b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: A failing flaky test doesn't mention the time.
Solution: Add the time for debugging. Improve error message.
06d32a0c17
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Recursively calling :defer function if it does :qa in a compiled
function.
Solution: Clear the defer entry before calling the function. (closesvim/vim#12271)
a1f2b5ddc6
Problem: Recursively calling :defer function if it does :qa.
Solution: Clear the defer entry before calling the function. (closesvim/vim#12266)
42994bf678
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when using "!!" without a previous shell command.
Solution: Check "prevcmd" is not NULL. (closesvim/vim#11487)
6600447c7b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: ":!" doesn't do anything but does update the previous command.
Solution: Do not have ":!" change the previous command. (Martin Tournoij,
closesvim/vim#11372)
8107a2a8af
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Ruler not drawn correctly when using 'rulerformat'.
Solution: Adjust formatting depending on whether the ruler is drawn in the
statusline or the command line. (Sean Dewar, closesvim/vim#12246)
fc8a601c32
This issue was made apparent after neovim/neovim@0f1e2b6, as `showmode()` calls
`win_redr_ruler()` with `curwin` now if it's floating, rather than the last
window if there's no statusline (which usually already shares its right side
with that of the editor).
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Problem: The :defer command does not check the function argument count and
types.
Solution: Check the function arguments when adding a deferred function.
169003289f
Cherry-pick check_internal_func() from Vim, but use EvalFuncDef pointer
as first argument.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Deferred functions not invoked when partial func exits.
Solution: Create a funccall_T when calling a :def function.
9667b2c888
The remove_funccal() function is currently unused, but it will be used
in patch 9.0.0618.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Invalid memory access with bad 'statusline' value.
Solution: Avoid going over the NUL at the end.
7b17eb4b06
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Invalid memory access with recursive substitute expression.
Solution: Check the return value of vim_regsub().
3ac1d97a1d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Invalid memory access in substitute with function that goes to
another file.
Solution: Check for text locked in CTRL-W gf.
cc762a48d4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: C++ 20 modules are not recognized.
Solution: Add patterns to recognize C++ 20 modules as "cpp". (Ben Jackson,
closesvim/vim#12261)
732d69e191
Co-authored-by: Ben Jackson <puremourning@gmail.com>
Problem: Code for making 'shortmess' temporarily empty is repeated.
Solution: Add functions for making 'shortmess' empty and restoring it.
(Christian Brabandt, closesvim/vim#11709)
9aee8ec400
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Only created files can be cleaned up with one call.
Solution: Add flags to mkdir() to delete with a deferred function.
Expand the writefile() name to a full path to handle changing
directory.
6f14da15ac
vim-patch:8.2.3742: dec mouse test fails without gnome terminfo entry
Problem: Dec mouse test fails without gnome terminfo entry.
Solution: Check if there is a gnome entry. Also fix 'acd' test on
MS-Windows. (Dominique Pellé, closesvim/vim#9282)
f589fd3e10
Cherry-pick test_autochdir.vim changes from patch 9.0.0313.
Cherry-pick test_autocmd.vim changes from patch 9.0.0323.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: :defer not tested with exceptions and ":qa!".
Solution: Test :defer works when exceptions are thrown and when ":qa!" is
used. Invoke the deferred calls on exit.
58779858fb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot use a partial with :defer.
Solution: Add the partial arguments before the other arguments. Disallow
using a dictionary.
86d87256c4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cleaning up after writefile() is a hassle.
Solution: Add the 'D' flag to defer deleting the written file. Very useful
in tests.
806a273f3c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cleaning up afterwards can make a function messy.
Solution: Add the :defer command.
1d84f7608f
Omit EX_EXPR_ARG: Vim9 script only.
Make :def throw E319 to avoid confusing behavior.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Test fails because of using Vim9 syntax in legacy function.
Solution: Add "call".
4f16e9de98
Add test_nested_function.vim changes from patches 8.{0.0141,2.1432}.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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 vim/vim#9310)
2ef9156b42
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when using a null function reference. (Naohiro Ono)
Solution: Check for an invalid function name. (closesvim/vim#8367)
22db0d549f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when passing NULL function to reduce().
Solution: Check for NULL pointer and give an error. (Dominique Pellé,
closesvim/vim#7243)
0d90e728fe
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Memory allocation failure not tested when defining a function.
Solution: Add a test. (Yegappan Lakshmanan, closesvim/vim#10127)
7c7e19cf50
test_alloc_fail() is N/A.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: getscriptinfo() loops even when specific SID is given.
Solution: Only loop when needed. Give a clearer error message.
(closesvim/vim#12207)
2d68b722e3
Problem: It is not easy to get information about a script.
Solution: Make getscriptinf() return the version. When selecting a specific
script return functions and variables. (Yegappan Lakshmanan,
closesvim/vim#10991)
2f892d8663
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: getscriptinfo() does not include the version. Cannot select
entries by script name.
Solution: Add the "version" item and the "name" argument. (Yegappan
Lakshmanan, closesvim/vim#10962)
520f6ef60a
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: String interpolation fails when not evaluating.
Solution: Skip the expression when not evaluating. (closesvim/vim#10398)
70c41241c2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Interpolated string expression requires escaping.
Solution: Do not require escaping in the expression.
0abc2871c1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closesvim/vim#10327)
2eaef106e4
Cherry-pick Test_Debugger_breakadd_expr() from Vim.
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Problem: Heredoc expression evaluated even when skipping.
Solution: Don't evaluate when "skip" is set. (closesvim/vim#10306)
05c7f5d3d0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Run more expression tests also with Vim9. Fix an uncovered
problem.
fea43e44c0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot put space between function name and paren.
Solution: Allow this for backwards compatibility.
bbd3e3c357
This fixes a regression from patch 8.2.1365, which isn't ported yet.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using channel or job with ":execute" has strange effects.
Solution: Give an error message for Job and Channel.
b662591e50
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using null object with execute() has strange effects.
Solution: Give an error message ofr Job and Channel.
e2a8f0773e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Messages test fails in small version.
Solution: Only use test_null_job() when available.
da292b07af
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: "exit_cb" causes Vim to exit.
Solution: Require white space after a command in Vim9 script. (closesvim/vim#7467)
Also fix that Vim9 style heredoc was not always recognized.
b5b9480ee9
Omit EX_NONWHITE_OK, E1143, E1144: Vim9 script only.
Cherry-pick test_vimscript.vim changes from patch 8.2.2141.
Cherry-pick E1145 tag from Vim runtime.
N/A patches for version.c:
vim-patch:8.2.2140: build failure with tiny features
Problem: Build failure with tiny features.
Solution: Add #ifdef.
2a3cd3af45
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No falsy Coalescing operator.
Solution: Add the "??" operator. Fix mistake with function argument count.
92f26c256e
Cherry-pick tv2bool() into eval/typval.c.
Cherry-pick *??* tag from Vim runtime.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no line break allowed inside a list.
Solution: Handle line break inside a list in Vim9 script.
7147820cb9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when passing NULL to setcmdline(). (Andreas Louv)
Solution: Use tv_get_string() instead of using v_string directly.
(closesvim/vim#12231, closesvim/vim#12227)
ac6cd31afc
Problem: Ending Insert mode when accessing a hidden prompt buffer.
Solution: Don't stop Insert mode when it was active before. (closesvim/vim#12237)
05a627c3d4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: .fs files are falsely recognized as forth files.
Solution: Check 100 lines for something that looks like forth. (Johan
Kotlinski, closesvim/vim#12219, closesvim/vim#11988)
065088d554
Co-authored-by: Johan Kotlinski <kotlinski@gmail.com>
Problem: Livebook files are not recognized.
Solution: Add a pattern for Livebook files. (Mathias Jean Johansen,
closesvim/vim#12203)
6400203517
Co-authored-by: Mathias Jean Johansen <mathias@mjj.io>
Problem: Cursor in wrong position when leaving insert mode.
Solution: Update the w_valid flags. Position the cursor also when not
redrawing. (closesvim/vim#12137)
c174c2e58c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Indent wrong after "export namespace" in C++.
Solution: Skip over "inline" and "export" in any order. (Virginia Senioria,
closesvim/vim#12134, closesvim/vim#12133)
99e4ab2a1e
Co-authored-by: Virginia Senioria <91khr@users.noreply.github.com>
Problem: "wat" and "wast" files are one filetype.
Solution: Add a separate filetype for "wat" files. (Amaan Qureshi,
closesvim/vim#12165)
3ea62381c5
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
vim-patch:9.0.1419: Lean files are not recognized
Problem: Lean files are not recognized.
Solution: Add a pattern for Lean files. (Amaan Qureshi, closesvim/vim#12177)
4a5c39fc52
vim-patch:9.0.1421: Nu files are not recognized
Problem: Nu files are not recognized.
Solution: Add a pattern for Nu files. (Amaan Qureshi, closesvim/vim#12172)
8aa2a37f89
vim-patch:9.0.1422: Sage files are not recognized
Problem: Sage files are not recognized.
Solution: Add a pattern for Sage files. (Amaan Qureshi, closesvim/vim#12176)
d0639d717b
vim-patch:9.0.1423: WebAssembly Interface Type files are not recognized
Problem: WebAssembly Interface Type files are not recognized.
Solution: Add a pattern for WIT files. (Amaan Qureshi, closesvim/vim#12173)
890c772036
existing behavior of
:=
and
:[range]=
are unchanged. `|` is still allowed with this usage.
However,
:=p
and similar are changed in a way which could be construed as a breaking
change. Allowing |ex-flags| for := in the first place was a mistake as
any form of := DOES NOT MOVE THE CURSOR. So it would print one line number
and then print a completely different line contents after that.
Problem:
On Windows, :make does not display the output of the program it runs.
The cause is the default 'shellpipe'. On Linux, nvim uses `tee` to redirect the
output to both stdout and the error file. In Windows, for both cmd.exe and
powershell, the output is only redirected to the error file.
Solution:
- On Windows, change the 'shellpipe' default to "2>&1| tee".
- Nvim includes `tee` in its Windows package.
- Document recommended defaults for powershell.
Fixes#12910
Problem: ILE RPG files are not recognized.
Solution: Add patterns for ILE RPG files. (Andreas Louv, issue vim/vim#12152)
e202ec8a0c
Co-authored-by: Andreas Louv <andreas@louv.dk>
we cannot remove 'paste'. It is very common in plugins and configs.
'pastetoggle' can and should be removed though, it's a total waste of everyone's time because it generates bug reports and doesn't work well, and is useless because bracketed-paste works better.
Problem: Autoload script sourced twice if sourced directly.
Solution: Do not source an autoload script again. (issue vim/vim#6644)
daa2f36573
Cherry-pick ret_sid changes from patch 8.2.0149.
Use do_in_runtimepath() as that's what source_runtime() calls in Nvim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot easily get the list of sourced scripts.
Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan,
closesvim/vim#10957)
f768c3d19c
Cherry-pick usr_41.txt change from a later runtime update.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Highlight for popupmenu kind and extra cannot be set.
Solution: Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel
highlight groups and use them. (Gianmaria Bajo, closesvim/vim#12114)
6a7c774920
Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
Problem: Expression "!expr->func()" does not work.
Solution: Apply plus and minus earlier. (closesvim/vim#6348)
0b1cd52ff6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using NULL pointer with nested :open command.
Solution: Check that ccline.cmdbuff is not NULL.
7ac5023a5f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Value of MAXCOL not available in Vim script.
Solution: Add v:maxcol. (Naohiro Ono, closesvim/vim#9451)
56200eed62
The variable is always 2147483647, but introducing it makes functions
easier to document.
Co-authored-by: naohiro ono <obcat@icloud.com>