Repository navigation
the text arguments of a command in a lambda block run onto later lines - #157
Merged
Merged
Conversation
Problem: The text arguments of a command in a lambda block run onto
later lines.
Solution: End the text of a command at a head that opens a line of the
block (Galvarcus).
The lines of a lambda block stay in one statement. text_args read a word
as an argument of every text command before it in the statement, up to
a bar, and `:normal` past every bar. So after `edit foo`, `highlight Foo
guifg=red` or `normal! gg`, a call `Missing()` on the next line of the
block was marked as a word of Vim, and a call to a function that does not
exist gave no unplaced name.
opens_block_line now tells a head that opens a line of the block, and
the text of a command before it ends there. A head that a backslash
carries on to a line of its own ends the text as well, which leaves a
word counted and drops none.
The four corpora and the survey report the same as before.
fixes: #155
related: #140
related: #153
Assisted-by: Claude Opus 5
Signed-off-by: Galvarcus <117151435+Galvarcus@users.noreply.github.com>
7 tasks done
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.
The lines of a lambda block stay in one statement.
text_argsread a word as an argument of every text command before it in the statement, up to a bar, and:normalpast every bar. So afteredit foo,highlight Foo guifg=redornormal! gg, a callMissing()on the next line of the block was marked as a word of Vim, and a call to a function that does not exist gave no unplaced name.opens_block_linenow tells a head that opens a line of the block, and the text of a command before it ends there. A head that a backslash carries on to a line of its own ends the text as well, which leaves a word counted and drops none.fixes: #155
AI assistance
Checklist
tools/checkprintsevery check passedSigned-off-by:trailer is present, which theprepare-commit-msghook adds. A fresh checkout has no hooks,so install them again before the first commit
Tests
the_text_arguments_of_a_command_in_a_lambda_block_end_with_its_lineintests/vim9_excmds.rsfails without the change: all threeMissingreferences were marked as Vim's. It also guards that the arguments themselves stay Vim's.What the analyzer reports
The four corpora and the survey report the same as before.
Documentation