Problem: When the value of an exported variable sources an autoload
script, the script fails to load with E1043.
Solution: Reset is_export while sourcing a script, and remove the reset
added in patch 9.1.1040 (Hirohito Higashi)
closes: #21610
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When CursorHold triggers while waiting for the key after
CTRL-W, the CTRL-W command fails with a beep(Emilien Breton).
Solution: Do not trigger CursorHold while getting the keys of a CTRL-W
command (Hirohito Higashi).
fixes: #21481closes: #21485
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: prop_type_get() does not return the "override" item, although
it is documented to return the fields given to prop_type_add().
Solution: Add the "override" item (Hirohito Higashi).
closes: #21497
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A tuple type with more than 127 items gets a wrong item count
and reads past the end of an array. Allocation failure for a
tuple type is not handled.
Solution: Use an int for the item count. Use the "any" type when
allocation fails (Hirohito Higashi).
closes: #21517
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The documentation for getinfo() is hard to understand.
Solution: fix it.
closes: #21475
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Assigning to an element of an outer function's argument inside
a lambda causes a crash when the lambda is called.
Solution: When an outer function's argument is found on the left-hand
side of an assignment, record that the outer scope is used and
treat the lambda as a closure.
When an outer function's argument was used on the left-hand side of an
assignment, a LOADOUTER instruction was generated, but the lambda was
not treated as a closure. Consequently, the outer stack was not set for
the partial, leading to a NULL reference during the execution of
LOADOUTER.
fixes: #21460closes: #21465
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a {} block of :autocmd or :command, a lambda whose
expression continues on the next lines gives E341 and loops
forever, or E342 when "|" and a command follow it.
Solution: Stop splitting the lambda into lines at the end of the
expression.
fixes: #21453closes: #21455
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The PR template asks again for what the commit message
already provides as the title and description, and its
checklist items list alternatives in one line that must be
edited instead of ticked. AGENTS.md shows a patch number in
the subject, which is added only when merging.
Solution: Explain the commit message form in a comment, give each
alternative its own checkbox, and drop the patch number from
the AGENTS.md example.
closes: #21454
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: There is no way to get the definition of a builtin or a user
defined function, of an Ex command, of an option or of a v:
variable from Vim script. A language server has to parse the
help text or the output of ":function" and ":command" for it.
Solution: Add getinfo({kind}, {name} [, {opts}]), which returns a Dict
with the definition of {name}: a function, an Ex command, an
option or a v: variable. Keep the names of the arguments of
the builtin functions in their table and report them in
"args" (Hirohito Higashi).
closes: #21293
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a block that is not executed, the text lines of :append,
:insert and :change are parsed as commands, so e.g. a text
line "endif" ends the block
Solution: Read and discard the text up to "." while skipping. Add the
commands to the ":help :bar" list.
closes: #21331
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Sourcing lines from a buffer drops the line after one that is
248 bytes long: it is taken for the rest of that line.
Solution: Only read more of a line when reading from a file; a line of
a buffer is taken as a whole (Hirohito Higashi).
closes: #21392
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a :def function a lambda in parentheses that is called
right after a constant operand gives E1085, while it works at
the script level: the constant is pushed on the stack after
the lambda.
Solution: Generate the pending constants before the lambda.
closes: #21403
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: deepcopy() of a list or dict that holds a null list, tuple or
dict drops items, and getscriptinfo() with "sid" leaves out
"variables" and "functions" for a script with such a variable.
Solution: In item_copy(), do not treat a null list, tuple or dict as a
copy failure (Hirohito Higashi).
Test_deepcopy_null_item() checks that deepcopy() of a dict and of a list
holding a null dict, list and tuple gives an equal copy, in legacy Vim
script and Vim9 script. Test_getscriptinfo_null_var() checks
"variables" and "functions" of getscriptinfo() for a Vim9 script with a
null_dict script variable next to another one.
closes: #21409
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Getting an item from a list or dict that is the member of a
dict<any>, such as "d.big[key]", is slow when it is big.
Solution: In check_typval_type() do not go through the values when
list<any> or dict<any> is expected (Hirohito Higashi).
The check is done by ISN_CHECKTYPE for every such index. With a
dict<any> of 2581 lists, indexing each one took 28 seconds before and
0.002 seconds after.
closes: #21389
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The PR template has typos, calls the "related:" header
"references:", and does not agree with CONTRIBUTING.md on
Signed-off-by or with AGENTS.md on the Solution line.
Solution: Fix the typos and make the template agree with them.
closes: #21397
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A PR whose commits have an "Assisted-by:" trailer gets no
label, and contributors cannot add one themselves.
Solution: In the Labeler workflow, add the "AI assisted" label when a
commit message of the PR has an "Assisted-by:" trailer.
closes: #21399
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: After undo or redo a text property may still be marked as
continuing to or from a line that is no longer next to it,
when the property was added after the change was saved
(david-k).
Solution: After undo and redo clear the continuation flags that have
no partner in the line above or below the restored lines,
and remember in the undo entry those cleared on the lines
around them, to put them back when the entry is applied the
other way.
Undo and redo restore the saved lines as they were, but a line just
outside of them may have got or lost a property since. The flags
cleared on that line are kept with the undo entry, not in the undo
file, so that undoing the redo joins the property again instead of
splitting it. The line itself is not touched, so marks and signs on
it stay where they are.
Add Test_prop_undo_redo_added_across_lines(), which checks
prop_list() after redo deletes the line where a property starts or
where it ends, and after undo brings the line back as one property
again.
fixes: #21350closes: #21366
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a :def function a line that starts with a single-quoted
string reading like "name =<< END" is taken as the start of
a heredoc, giving E1145 and swallowing the rest of the file.
Solution: Only skip a range when a colon precedes it, since in Vim9
script a leading "'" without one starts a string, not a
mark (Hirohito Higashi).
closes: #21377
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A :def function in a legacy script can create a script-local
variable by assigning to it, while declaring one with "var"
gives E1101.
Solution: Give E1089 for assigning to an unknown script-local variable
in any :def function, not only in one defined in a Vim9
script. Remove uf_script_ctx_version, which was only used
for this check. Do not give it with ":source ++dryrun".
runtime/menu.vim created s:bmenu_short, s:bmenu_count, s:suglist,
s:fromword, s:changeitem, s:additem and s:ignoreitem this way, define
them at the script level.
":source ++dryrun" does not execute ":let" in a legacy script, thus
every script variable would be unknown when compiling. Document that
reading or calling such a variable without "s:" still gives an error,
and separate the paragraphs of ":source-dryrun" with blank lines.
Test_unlet() created s:somevar this way, define it at the script level
instead. Test_using_s_var_in_function() checks that assigning to
s:scriptlevel in a :def function of a legacy script gives E1089 when
the variable does not exist. Test_source_dryrun() checks that
assigning to a script variable with "s:" in a :def function of a
legacy script gives no error with ":source ++dryrun".
closes: #21379
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The "if a:findstart" block in javascriptcomplete#CompleteJS()
has no matching :endif.
Solution: Add the missing :endif before :endfunction.
This has no user-visible effect. Both branches of the block return
before reaching :endfunction, so calling the function never gives
E171 and completion works as before.
closes: #21388
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Assigning to an item of a read-only v: variable, gives E46 in
a :def function, while it works at the script level and
":help clipboard-providers-define" does it.
Solution: Check that a v: variable is read-only only when no index
follows, as for a script variable. Make v:clipproviders an
empty dict at startup, as v:colornames, so that a :def function
can add the first item.
closes: #21391
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: "if 0" condition not correctly skipped for :command, :autocmd,
:class, :interface, :enum and :loadkeymap
Solution: Skip those commands and discard the blocks they read
(Hirohito Higashi).
closes: #21349
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: assigning a non-String value to an environment
variable, a register or a String v: variable at the script
level converts the value, while a :def function gives E1012.
Solution: Also check the type at the script level and give E1012
Using "@#" still takes a Number with "=".
Add Test_assign_string_only(), which checks that these fail with E1012
both in a :def function and at the script level: "= 123", "..= 123"
and "= true" on $XSTRING_ONLY, @a and v:errmsg, "@# ..= 1" and
"[$XSTRING_ONLY, @a] = [1, 2]". It also checks that legacy :let still
converts a Number to a String for these three targets.
closes: #21364
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: GetRemotePtyDev() and BufUnloaded() in termdebug declare loop
variables they never use, the variable window code declares
"spaceBuffer" and never uses it, and FormatRange() in
dist/json.vim computes "indent" and never uses it.
Solution: Remove the unused declarations, loop with "_" where only the
count matters, and iterate over values() where the keys are
not needed (Hirohito Higashi).
closes: #21368
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: After ":silent make" or ":silent grep" the window stays blank
until the screen is redrawn by hand.
Solution: Ask wait_return() for the redraw where the output of the
command cannot be seen anyway: with the screen swapped or in
the GUI. With an empty 't_ti' the output is left on the
screen, as it was. Test_silent_shell_output_kept() in
test_shell.vim checks that ":silent !seq 1 3" leaves its
output there (Hirohito Higashi).
closes: #21329
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test_lsp_incomplete_message_while_blocked waits a fixed 20
msec before sending the second half of a notification, which
a loaded machine stretches past the 100 msec an incomplete
message is kept.
Solution: Send the second half once the other Vim reports that its
blocking reads have started. Ask for the count a few times
with a pause in between and put the numbers in the message.
closes: #21345
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When 'fillchars' is set without a "vert" item, the vertical
separator is drawn with a space instead of the documented
default '|' (habamax).
Solution: Use '|' as the internal default for "vert" in
set_chars_option() (Hirohito Higashi).
fixes: #21322closes: #21325
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: borrow_stl_vsep_hl() takes the status line highlight from the
cell before the vertical separator, which a window of zero
width does not have: the cell before the screen is read. With
the windows laid out for a size the GUI has not reached, the
rows below the screen are read as well, which crashes gvim on
MS-Windows in test_popup.vim since the tests redraw the shell
after setting its size (after v9.2.0488).
Solution: Skip a window of zero width and stay inside the screen.
Test_statusline_vsep_borrow_zero_width_window() puts a zero by
zero window next to another one with both status lines on the
first screen line, which reads before the screen without the fix.
(Hirohito Higashi).
fixes: vim/vim-win32-installer#487
related: #20182
closes: #21313
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The image of a popup window is drawn on top of every other
popup, also one with a higher zindex that covers it: the kitty
placement, the GTK4 image list and the GDI and Cairo blits all
go on top of the text. Only the sixel backend redraws the
covered cells.
Solution: Draw the image in the rectangles that no popup with a higher
zindex covers, from the popup mask: one kitty placement, one
GUI blit or one GTK4 image entry for each (Hirohito Higashi).
closes: #21298
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test_lsp_incomplete_message_while_blocked failed three times
in a row on macOS, twice in one day, with the notification
counted as zero. The second half of the notification is sent
50 msec after the first, half of the 100 msec an incomplete
message is kept.
Solution: Send the second half after 20 msec.
closes: #21299
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The Vim9 return type of autocmd_add() and autocmd_delete() is
a Number while they return a Bool, reltime() gives list<any>
for a List of Numbers, searchcount() dict<any> for a Dict of
Numbers and matchfuzzypos() list<any> for a List of Lists.
The return type of get(), abs(), sign_define(), match(),
expand(), glob(), globpath(), findfile(), diff() and
serverlist() is "any" for every call, while the type follows
from the argument types or from the number of arguments: get()
on a Blob returns a Number, abs() of a Float a Float, expand()
without {list} a String. submatch() is typed as a String even
with {list}. The help has the types right.
Solution: Give the table the types the functions return, with a return
type function where the type depends on the arguments: a
String for the functions that return a List only with an
optional argument, when that argument is absent; the type of
the item for get() when a missing item has the same type;
Float or Number for abs(); Number or list<number> for
sign_define(); Number for match(). A Vim9 script that assigns
one of these to a variable of another type gets E1012 with
this change; that includes the Number of get() assigned to a
Bool, as it already is for len() (Hirohito Higashi).
closes: #21292
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: After joining lines with "J", a listener added with
listener_add() and the "text" option receives the first line
as it was before the join: um_store_changes() replaces the
line in the memline without updating ml_line_textlen, so
add_change_text() copies only the old length. An LSP client
relaying the text loses the joined part.
Solution: Update ml_line_textlen in um_store_changes()
(Hirohito Higashi).
closes: #21302
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The wl_clipboard sample in wayland.txt and the WSL sample in
eval.txt call system() and systemlist() without :silent, so
the terminal is put in cooked mode while the command runs and
what it sends in the meantime, such as a focus event, shows up
on the screen.
Solution: Prepend :silent in both samples, the WSL one as :def functions
since a lambda cannot carry a modifier, and tell in the
section on the callbacks that a command run with system() or
systemlist() needs it.
fixes: #21217closes: #21308
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The help gives the return type of libcallnr() as a String and
that of pow() as a Number, while the first returns a Number and
the second a Float, as the text of both entries says. The Dict
pum_getpos() returns holds only Numbers, the help says dict<any>.
Solution: Correct the three "Return type:" lines.
closes: #21291
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In Vim9 script "ch_log" on a line of its own gives E1144
"Command ch is not followed by white space", as if it were
":change" with "_log" behind it, while "strlen" gives E476
"Invalid command". The message sends the reader looking for a
missing space.
Solution: When the character after the command name is an underscore,
treat the word as an invalid command. Nothing is executed
either way; the "exit_cb" line that once ran ":exit" now gets
E476 (Hirohito Higashi).
closes: #21296
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test_sign_jump_name_with_bar fails on MS-Windows with E303,
the buffer name contains a bar which is not valid in a file name
there and the swap file cannot be created.
Solution: Do not create a swap file for the buffer, the name itself is
what the test is about. Drop the CheckFeature signs test, it
is set at the top of the test file
closes: #21294
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: There is no way to have Vim read a script and compile its
:def functions without running it, so that a script can be
checked for errors without its side effects.
Solution: Add "++dryrun" to ":source": only the definitions in the
script are executed, a declared variable gets its type but
not its value, everything else is skipped, then the functions
are compiled and the errors reported. An error in a
definition does not stop the reading. The condition of an
":if", ":elseif", ":while" or ":for" and an import name with
a function call are not evaluated, and no SourceCmd,
SourcePre or SourcePost autocommand is triggered
(Hirohito Higashi).
closes: #21257
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: With the GTK4 GUI, the image of a popup window stays on the
screen when the text under it scrolls or is cleared, for
example by ":version". The other image backends paint the
image once, and the text written over it removes it.
Solution: Remove an image from the list of images to render when a cell
it covers is cleared or moved. The next redraw emits it again
(Hirohito Higashi).
related: #21234
closes: #21274
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: get_user_highlight_id() passes the size_t of STRLEN() to
syn_check_group(), which takes an int. MSVC warns with C4267.
(after v9.2.1001).
Solution: Cast to int, like the other callers do (Hirohito Higashi).
related: #21105
closes: #21279
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: gui_wait_for_chars() passes a long to gui_mch_wait_for_chars(),
the GTK and X11 implementations take a long, the MS-Windows,
Photon and Haiku ones take an int.
Solution: Take a long everywhere (Hirohito Higashi).
closes: #21278
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The first and the last line of the generated .pro files are
"/* */" comments.
Solution: Regenerate the files with "make proto", update the hand
written protoype files to match the style, update the
generator to use // comments instead, add socketserver to
PROTO_FILES (Hirohito Higashi)
closes: #21277
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The image of a tab-local popup window stays on the screen
after switching to another tab page, while the border and the
background of the popup are gone. The image backends keep an
image until it is removed: a kitty placement and a GTK4
texture until they are deleted, GDI and cairo pixels until the
area is repainted, sixel pixels until the screen is cleared.
Solution: Remove the images of the popups local to a tab page when the
tab page is left, they are emitted again when it is entered.
(Hirohito Higashi).
related: #21234
closes: #21273
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: With Make_mvc.mak, testing.obj and sound.obj are only rebuilt
when their own source file changes. The rule for testing.obj
names term.obj as its target, sound.obj has no rule at all, so
both are built by the inference rule, which does not depend on
the header files. Linking fails with an unresolved
in_vim9script() after patch 9.2.1044 unless the old object is
deleted by hand.
Solution: Name testing.obj in its rule and add a rule for sound.obj
(Hirohito Higashi).
closes: #21272
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: While ch_evalexpr() waits for a response, nothing is read
from the other channels: what they receive stays in the pipe,
and a message of theirs that was only partly read is dropped
as garbage after 100 msec, along with what follows it.
Solution: Wait for the response and for the other channels together,
reading what arrives on any of them; count the timeout over
the whole wait.
closes: #21262
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A match found in an included file is shown with the full path
of the file, while a match from a buffer is shown with the
name under the current directory. A file included as
"./file" even has the "./" left in: "dir/./file".
Solution: Show the file by its name under the current directory, and
simplify the name of a file found relative to the current
one (Hirohito Higashi).
closes: #21264
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a GUI build the shell may be resized only after a redraw,
so a test that measures windows can see the resize land
halfway, Test_window_width for one.
Solution: Redraw after setting the size for a test, so that the resize
is done before the test starts (Hirohito Higashi).
closes: #21263
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: netrw#fs#Glob() calls s:NetrwRemoteListing() and uses
s:THINLIST, which are script-local to autoload/netrw.vim and
not visible in autoload/netrw/fs.vim. Listing a remote
directory in the tree view fails with E117 and E121.
Solution: Use netrw#Call() and netrw#Expose(), which exist to reach
the script-local functions and variables of netrw.vim.
closes: #21259
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A terminal entry with 16777216 colors, such as xterm-direct,
needs 'termguicolors' to show its colors, and a vimrc has no
way to tell that it is such a terminal.
Solution: Add "rgb" to terminalprops(), 'y' when 't_Co' is 16777216,
and document setting 'termguicolors' from it
(Hirohito Higashi).
related: #21251
closes: #21251
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When ":defcompile" compiles several functions and one of them
fails, a function after it that contains a lambda with a
block body fails as well, with E1028 and nothing else.
Solution: In get_function_body() only consider errors that were given
while reading the body. Keep define_function() from defining
a function whose header had an error (Hirohito Higashi).
closes: #21252
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Some characters get a different width in a terminal window
than in an ordinary window.
Solution: When the application provides a width function, use it as the
only source for the width of a character (Hirohito Higashi).
libvterm looks up its own "fullwidth" table before calling the wcwidth()
function that Vim provides. That table holds Unicode 12 data, while Vim
follows a newer version, so U+1F93B and U+1F946 are two cells wide in a
terminal window and one cell wide everywhere else. U+302A-302D and
U+3099-309A are affected as well: both tables list them as wide, but the
function Vim provides reports zero for a composing character.
Skipping the table when a wcwidth() function is provided makes that
function the only authority, so a terminal cell gets the same width as
the character gets in a buffer. A build of libvterm without such a
function keeps using the table.
closes: #21213
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A Vim started by another program cannot talk to it over its
stdin and stdout the way a language server does; a script has
to make it connect to a socket instead.
Solution: Add the --stdio-channel argument and the "stdio" address for
ch_open(). Vim then serves the channel instead of reading Ex
commands and exits when it is closed. Stdin and stdout are
redirected to the null device so that other output cannot get
into the channel (Hirohito Higashi).
closes: #21245
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: On MS-Windows, ch_listen() and ch_open() with a "unix:"
address fail with E1573 unless a TCP channel was used before
in the same Vim process.
Solution: Initialize Winsock before creating a Unix domain socket, as
is done for TCP sockets (Hirohito Higashi).
closes: #21242
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim crashes when slicing a list from range() that has more
than 2147483647 items. range() also reports a start past
the end for a valid range that spans the whole Number
range, and len() changes after a list with a large {stride}
is materialized (liuyi1231).
Solution: Give E1510 when the number of items or {stride} does not fit
in an int, and compute the length with unsigned arithmetic so
it cannot overflow. Also stop list_slice() from using a NULL
item, which 9.0.2123 made possible by re-checking the index
after materializing (Hirohito Higashi).
fixes: #21235closes: #21236
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: With 'wildmode' set to list:full the matches are listed but the
wildmenu is not shown, although it is "full" that starts
wildmenu mode (zeertzjq).
Solution: List the matches and show the menu, as the two behaviors in
the same phase ask for. The menu is left to the phases that
ask for it, so that "list" on its own still only lists
(Hirohito Higashi).
fixes: #21196closes: #21205
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: With an operator pending, a :redraw from an autocommand or a
callback leaves the cursor where the drawing ended, so it is
seen in the wrong place until the operator is finished. A
popup closed from such an autocommand shows this.
Solution: Put the cursor back after the screen is updated. This has to
happen before RedrawingDisabled is restored, which an
autocommand may have set, since setcursor() does nothing then.
closes: #21199
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: C keywords are matched using the characters from 'iskeyword',
so changing that option highlights part of an identifier as a
keyword and leaves keywords containing an underscore
unhighlighted.
Solution: Set the keyword characters with ":syn iskeyword".
fixes: #21173closes: #21176
Co-Authored-By: Maxim Kim <habamax@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The width of a popup window changes while it is scrolled when
it has a scrollbar and a line that wraps. The border is left
broken where the popup got narrower.
Solution: Reserve the scrollbar column only once, and do not adjust the
width for a scrollbar that was already there
(Hirohito Higashi).
closes: #21183
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Four of the package sections tell the reader to load the
plugin with "packadd", and the comment one goes on to talk
about putting that line in the vimrc file. Without the "!"
the package is loaded there and then rather than during the
usual startup, which is not what a vimrc wants. The matchit
section then explains the help file being found by saying
":packadd" loaded the plugin, which is what the "!" keeps it
from doing.
Solution: Give every package section the same line to write, correct the
reason the help file is found, and say once, where the
packages are introduced, which of the two forms belongs in a
vimrc.
closes: #21186
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Nothing says why the cursor position shown by the 'ruler' does
not follow the cursor in a terminal window while the job runs.
Solution: Say that what the terminal shows reaches the buffer only when
Vim takes over, so there is no position to report until then.
fixes: #21174closes: #21190
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim crashes when an autocommand that is triggered by setting
'eventignore' or 'eventignorewin' changes that option again.
This happens with plugins that use ":noautocmd" in an
autocommand for an event that is checked in the main loop
(Brian E Clow).
Solution: Trigger the events with a copy of the old value in effect, so
that the value the caller is still using is not freed. Keep
the window that holds 'eventignorewin' from being closed while
the events are triggered (Hirohito Higashi).
fixes: #21169
related: #21074
closes: #21175
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A completion asked for with CTRL-X CTRL-O while
'autocompletedelay' is running is given the look of an
automatic one, the implicit "noselect" among it.
Solution: Turn autocompletion off where a typed key takes the completion
over. A completion already on screen goes on being what it
was (Hirohito Higashi).
closes: #21158
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In Vim9 script a line starting with a dict member is looked
ahead at, to tell an assignment from an expression. Where the
expression runs on into the next line the lookahead cannot
follow it, and what it makes of that reaches "v:errmsg" and
whatever is being redirected, though nothing is wrong and the
function compiles.
Solution: Turn error messages off around the lookahead instead of
silencing them (Hirohito Higashi).
closes: #21168
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In Vim9 script a line break before "->(" makes Vim hang and
use up memory (SectionCotangentBundle)
Solution: Consume the line break for "->(" as well, and skip white
space after "->" in a compiled function too (Hirohito Higashi).
fixes: #21144closes: #21147
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A function used through 'omnifunc' or 'complete' is called the
same way whether 'autocomplete' started the completion or a
key asked for one, so it cannot answer differently.
Solution: Report which of the two it is in complete_info() as "auto". It
is returned only when asked for in {what}, so what
complete_info() says by itself does not change
(Hirohito Higashi).
closes: #21143
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A popup with a border loses part of the border when it does
not fit on the screen: the right border is missing when a
scrollbar is added, and the left border is missing when "pos"
is right aligned and "fixed" is set (Mao-Yining).
Solution: Reserve a column for a scrollbar that is added after the width
and the position were computed. For a right aligned popup
with "fixed", scroll the text instead of moving the border off
the screen (Hirohito Higashi).
fixes: #21128closes: #21145
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
blob2str(), str2blob(), base64_encode() and base64_decode() are only
listed under string-functions and channel-functions. Also use "Blob"
consistently and say "bytes" instead of "numbers" for reverse().
closes: #21148
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In Vim9 script, listener_add() given only a callback fails
with "E1212: Bool required for argument 3".
Solution: Check the third argument only when the second one is there.
Without a second argument the third is not filled in, so
what was checked was whatever happened to be in that slot
(Hirohito Higashi).
closes: #21116
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A request that a server named with a string cannot be
answered, since ch_sendexpr() rejects an "id" that is not a
Number.
Solution: Require a Number only when Vim has to match a reply, which
is with ch_evalexpr() or when a callback is given. Send the
message as it is otherwise (Hirohito Higashi).
fixes: #14091
fixes: #19003closes: #21114closes: #21126
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When a popup with a filter is displayed and a message causes the
hit-enter prompt, the key goes to the popup filter instead of the
prompt. The closed popup then stays on the screen, since there is
no redraw while the prompt is up.
Solution: Do not invoke popup filters while Vim is waiting for a key at a
prompt of its own. Adjust Test_popup_filter_win_execute_error(),
which relied on the filter getting the key at the prompt
(Hirohito Higashi).
fixes: #21052
closes: #21068
related: #6999
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Events that are triggered by comparing the current state against a
stored one are still reported once they are not ignored anymore.
This shows up when a command sets 'eventignore', changes something
and restores the option, since these events are only checked in
the main loop, which does not run while a command executes.
Solution: Move the checks done in the main loop into a function and also
call it when 'eventignore' or 'eventignorewin' changes, with the
old value in effect. What happened while an event was ignored is
then not reported, and what happened before still is.
fixes: #8641closes: #21074
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When a substitution is confirmed with the "c" flag and the
replacement contains "\r", undo restores the whole original line
while the lines already produced by earlier replacements stay,
duplicating text (Masato Nishihata).
Solution: Replace the line before the next confirmation prompt, so that the
line split and the replacement it belongs to end up in the same
undo block (Hirohito Higashi).
fixes: #4798closes: #21092
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: After Vim is killed with a deadly signal such as SIGTERM the
mouse stays enabled in the terminal, so moving the mouse
afterwards produces escape sequences in the shell
(Dominik George).
Solution: Switch the mouse off when exiting after a deadly signal. The
terminal mode is restored with "full_screen" already reset,
which makes settmode() return before it can do this
(Hirohito Higashi).
fixes: #21090closes: #21095
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a terminal window the empty lines are drawn without the
background color that was set with hl-terminal, while the lines
with text do use it (bfrg).
Solution: Stop clearing the window attribute on an empty line. The Visual
selection is already combined into the first cell of such a line,
so the background color can be kept (Hirohito Higashi).
fixes: #21087
related: #17559
related: #20547
closes: #21093
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Using an operator on a member of an object that is itself a
member of an object gives E909, and a plain assignment to it
stores the value in the wrong member (Mao-Yining).
Solution: When the last index is split off from the name, forget the
member index found for the first name. The index is compiled
before the variable, thus do not use the type that loading the
variable produced. Load the member of an object like an
expression does instead of indexing it (Hirohito Higashi).
fixes: #21084closes: #21085
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The test fails now and then, most often on MS-Windows. It uses the
same server name as another test in the file, and Vim appends a
number to the name when a server with that name is still running.
The name is then checked with a match, which still succeeds, and
with an exact comparison, which does not.
Solution: Use a name of its own and check the list with a pattern, so that a
number appended to the name does not matter.
closes: #21083
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The macOS CI job fails now and then on the check of ja.euc-jp.po.
The iconv of macOS turns a backslash that follows a multibyte
character into a fullwidth one, which breaks the escaping. The
file in the repository is correct, it is only regenerated when a
checkout leaves ja.po newer, which is why the failure comes and
goes.
Solution: Convert to EUC-JP-MS, which keeps the backslash and gives the same
result otherwise.
closes: #21082
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Initializing an object variable with a closure gives an internal
error when the constructor is called without arguments
(Mao-Yining).
Solution: Do not use "any" as the type of an argument that was not set, and
do not copy such an argument when the stack is copied for a
closure (Hirohito Higashi).
fixes: #21069closes: #21081
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A callback added with listener_add() is given the line numbers of
a change but not the text. When changes are buffered, two changes
to the same line do not change the line count and are reported
together, so getbufline() can only return the result of the second
one.
Solution: Let listener_add() take a Dictionary of options and add a "text"
option, which stores the resulting text in each item of the list
of changes. The text is copied when the change is recorded, so it
is not affected by later changes. Invoke the callback early when
a lot of text has been recorded, to bound the memory used.
related: #19621
closes: #21071
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Exchanging windows with CTRL-W x or rotating them with CTRL-W r
leaves a window with the status line height of the other one, so
with 'statuslineopt' the windows in a row no longer line up.
Solution: Keep the total height of each window when the status line height
is exchanged, and compute the height needed for the status line of
each window afterwards.
closes: #21079
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: On startup the GUI window is the height of the window decorations
too small, so it shows two lines less than 'lines'. It only gets
the right size after the first pointer event.
Solution: Also request the shell size on the form widget, so that GTK derives
the window height from it with the decorations included. Drop the
request again once the size was given, so that the window can still
be made smaller (Hirohito Higashi).
closes: #21045
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Excluding a value with 'isprint' also breaks the display of
unrelated characters whose leading byte has that value. After
":set isprint+=^226" the character U+222B is displayed as "<"
(Emilien Breton).
Solution: Apply 'isprint' to the character value only, not to the leading
byte of its UTF-8 encoding (Hirohito Higashi).
fixes: #21053closes: #21055
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test_xrestore() fails on CI and the retry fails as well, because
the retry runs in the same Vim and the connection to the X server
was not restored.
Solution: Restore the display in a "finally" block. Wait for the selection
to become available instead of failing with E353.
closes: #21066
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A callback added with listener_add() is given the line numbers of
a change but not the text. When changes are buffered, two changes
to the same line do not change the line count and are reported
together, so getbufline() can only return the result of the second
one.
Solution: Let listener_add() take a Dictionary of options and add a "text"
option, which stores the resulting text in each item of the list
of changes. The text is copied when the change is recorded, so it
is not affected by later changes. Invoke the callback early when
a lot of text has been recorded, to bound the memory used.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Problem: Test_xrestore() fails on CI and the retry fails as well, because
the retry runs in the same Vim and the connection to the X server
was not restored.
Solution: Restore the display in a "finally" block. Wait for the selection
to become available instead of failing with E353.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Problem: In an unpack assignment the variable after the ";" gets the type
of the whole tuple instead of the type of the remaining items.
When the assigned value has type "any" it even gets a list type,
so that a tuple cannot be assigned to it later (Mao-Yining).
Solution: Give the variable the type of the remaining items. Keep "any"
when it is not known whether a list or a tuple is assigned
(Hirohito Higashi).
fixes: #21057
fixes: #21058closes: #21059
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In GTK4, Vim may crash when the window is resized while the
cursor is displayed.
Solution: Remember the number of cells the cursor covers when the cursor
is set, instead of deriving it from the drawing position when
the snapshot is taken (Hirohito Higashi).
fixes: #21037closes: #21038
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test_terminal_aucmd_on_close() is flaky on MS-Windows: the
tests that wait for a terminal window to close use a timeout
shorter than the default, which is not enough when starting a
process is slow. When the wait fails the test aborts with
E121 and leaves an autocommand behind for the following tests.
Test_terminal_unwraps() checks the buffer contents without
waiting for the job to finish.
Solution: Use the default timeout of WaitForAssert(), initialize the
variable checked after the wait, and wait for the buffer to
hold the unwrapped line.
closes: #21039
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: u_read_undo() has comments that do not add anything to what
the code says (afte rv9.2.0935).
Solution: Drop the redundant comments (Hirohito Higashi).
related: #20942
closes: #21028
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The duplicate-check hashtab in insexpand.c has comments that
do not add anything to what the code says (after v9.2.0909).
Solution: Drop the redundant comments.
related: #20926
closes: #21027
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The comments on locking a list or dict while stringifying its
items say the same thing three times over, and at more length
than the existing comments on the same construct
(after v9.2.0936).
Solution: Shorten them.
related: #21001
closes: #21029
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: transstr() has comments that do not add anything to what the
code says, and it casts a length to int only to cast it back to
size_t.
Solution: Drop the comments and keep the length in a size_t
(Hirohito Higashi).
related: #20925
closes: #21026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In GTK4, when a dialog pops up while a mouse button is pressed,
moving the mouse afterwards starts a Visual selection without
any button being held down.
Solution: Forget about the pressed mouse button when a mouse move reports
that no button is down, since the button release event may have
gone to another widget (Hirohito Higashi).
related: #20907
related: #21014
closes: #21022
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In GTK4, moving the mouse over the window right after startup
clears the screen, including the intro message.
Solution: Keep the cached contents of the drawing area in sync with the
size Vim is going to draw (Hirohito Higashi).
fixes: #21016closes: #21021
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>