Skip to content

Conversation

@IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Dec 24, 2025

Fixes a few completion overwriting bugs. See commit messages for details.

Fixes #60444

When completing keyword arguments with the cursor in the middle of an
identifier (e.g., `verb|true` in `versioninfo(; verb|true)`), the
completion range was incorrectly set to cover the entire identifier
instead of just the portion before the cursor. This caused the
completion to overwrite the text after the cursor.

The fix intersects the character range with `1:pos` to limit the
replacement range to only the text before the cursor, matching the
behavior used for regular symbol completion.

Fixes JuliaLang#60444

Co-authored-by: Claude <[email protected]>
@IanButterworth IanButterworth added REPL Julia's REPL (Read Eval Print Loop) backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 labels Dec 24, 2025
@giordano
Copy link
Member

I believe this fixes another related bug I ran into yesterday: currently pressing TAB at | in

julia> f("/path/to/something|)[N]

deletes the rest of the line after |, when there's a path to complete. It'd be good to add a regression test also for that case.

Apply the same fix as the keyword argument completion to Dict key
completion and string path completion. These also had the issue where
completing with the cursor in the middle of text would overwrite
content after the cursor.

The fix intersects the completion range with `1:pos` to limit
replacements to only the text before the cursor.

Co-authored-by: Claude <[email protected]>
@IanButterworth IanButterworth changed the title REPL: fix keyword argument completion overwriting input after cursor REPL: fix completion overwriting input after cursor Dec 25, 2025
@giordano giordano added bugfix This change fixes an existing bug completions Tab and autocompletion in the repl labels Dec 25, 2025
@IanButterworth IanButterworth merged commit b6337dd into JuliaLang:master Dec 25, 2025
12 checks passed
@IanButterworth IanButterworth deleted the ib/repl_60444 branch December 25, 2025 11:55
KristofferC pushed a commit that referenced this pull request Jan 7, 2026
KristofferC pushed a commit that referenced this pull request Jan 8, 2026
KristofferC pushed a commit that referenced this pull request Jan 9, 2026
@KristofferC KristofferC mentioned this pull request Jan 9, 2026
40 tasks
@KristofferC KristofferC removed the backport 1.13 Change should be backported to release-1.13 label Jan 9, 2026
DilumAluthge pushed a commit that referenced this pull request Jan 9, 2026
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug completions Tab and autocompletion in the repl REPL Julia's REPL (Read Eval Print Loop)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REPL] Completing keyword arguments overwrites input

3 participants