fix(code-actions): offer destruct-line on inline matches - #1829
Merged
Conversation
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
from
July 24, 2026 16:05
564e394 to
bce797b
Compare
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
5 times, most recently
from
July 25, 2026 03:19
df81ac2 to
64bc451
Compare
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
4 times, most recently
from
July 25, 2026 04:12
25d4efa to
849db57
Compare
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
from
July 26, 2026 05:20
849db57 to
9f6d3ac
Compare
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
from
July 26, 2026 05:29
9f6d3ac to
f56fd35
Compare
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
from
July 26, 2026 05:49
f56fd35 to
9919ba9
Compare
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
7 times, most recently
from
August 1, 2026 16:09
9ee6af7 to
ea3013a
Compare
Lex the source to locate an inline match and its first outer case while ignoring nested syntax, comments, strings, and record updates. Mask only the prefix so existing line-oriented destruct processing keeps correct offsets and can extend incomplete inline matches. Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
rgrinberg
force-pushed
the
push-vysoxystqwrp
branch
from
August 1, 2026 17:05
ea3013a to
14a2873
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1595 by recognizing
matchexpressions embedded in larger lines and accepting ranges that cover the whole match expression.The implementation isolates match/case discovery in a small pure module backed by Merlin's OCaml lexer, while leaving the existing statement processing unchanged. When a match already has cases, the action asks Merlin for missing cases through the first case belonging to that match.
Quickcheck coverage varies prefixes, cursor positions, whitespace, comments, strings, record updates, and nested matches. End-to-end expectations verify complete edits for multiline matches, same-line cases, matches without cases, record-update scrutinees, and nested matches.