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.
Instead of nested linked lists, store autocommands in a flat, contiguous
kvec_t, with one kvec_t per event type. Previously patterns were stored
in each node of the outer linked list, so they can be matched only once
on repeating patterns. They are now reference counted and referenced in
each autocommand, and matching is skipped if the pattern repeats. Speeds
up creation and deletion, execution is not affected.
Co-authored-by: ii14 <ii14@users.noreply.github.com>
fix(extmarks): disallow removing extmarks in on_lines callbacks
decor_redraw_start (which runs before decor_providers_invoke_lines) gets
references for the extmarks on a specific line. If these extmarks are
deleted in on_lines callbacks then this results in a heap-use-after-free
error.
Fixes#22801
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>
Cirrus ci automatically pushes/caches docker images, which makes
containerization much simpler to handle. Moving this job to cirrus ci
shortens the job by a minute, and reduces github actions CI usage by two
minutes per PR.
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: Behavior of exists() in a :def function is unpredictable.
Solution: Add exists_compiled().
267359902c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Here's the headline: when run in sync mode (last argument cb=NULL),
these functions don't actually use the uv_loop_t.
An earlier version of this patch instead replaced fs_loop with
using main_loop.uv on the main thread and luv_loop() on luv worker
threads. However this made the code more complicated for no reason.
Also arbitrarily, half of these functions would attempt to handle
UV_ENOMEM by try_to_free_memory(). This would mostly happen
on windows because it needs to allocate a converted WCHAR buffer.
This should be a quite rare situation. Your system is pretty
much hosed already if you cannot allocate like 50 WCHAR:s.
Therefore, take the liberty of simply removing this fallback.
In addition, we tried to "recover" from ENOMEM in read()/readv()
this way which doesn't make any sense. The read buffer(s) are already
allocated at this point.
This would also be an issue when using these functions on a worker
thread, as try_to_free_memory() is not thread-safe. Currently
os_file_is_readable() and os_is_dir() is used by worker threads
(as part of nvim__get_runtime(), to implement require from 'rtp' in
threads).
In the end, these changes makes _all_ os/fs.c functions thread-safe,
and we thus don't need to document and maintain a thread-safe subset.
Problem: Functions for string manipulation are spread out.
Solution: Move string related functions to a new source file. (Yegappan
Lakshmanan, closesvim/vim#8470)
a2438132a6
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>