Repository navigation
the text of a :! command line runs past its end - #152
Merged
Merged
Conversation
Problem: The text of a :! command line runs past its end.
Solution: End the shell text of a :! at the end of its line, and in a
mapping at the first key name or bar (Galvarcus).
The rule of #142 read every word behind a :! as shell text, to the end
of the statement. In a mapping, the command line of the shell ends at
the `<CR>` that runs it, and the mapping ends at a bar. In a lambda
block, it ends with its line. So `:!git pull<CR>:call Missing()<CR>`,
`:!ctags -R .<CR>| call Missing()` and a `Missing()` on a later line of
the block marked `Missing` as a word of Vim, and a call to a function
that does not exist was no longer counted.
shell_text now bounds the text: the line of the :!, and in a mapping the
tokens before the first key name or bar. A key name such as `<Bar>`
that the shell would read 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: #150
related: #142
related: #140
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 rule of #142 read every word behind a
:!as shell text, to the end of the statement. In a mapping, the command line of the shell ends at the<CR>that runs it, and the mapping ends at a bar. In a lambda block, it ends with its line. So:!git pull<CR>:call Missing()<CR>,:!ctags -R .<CR>| call Missing()and aMissing()on a later line of the block markedMissingas a word of Vim, and a call to a function that does not exist was no longer counted.shell_textnow bounds the text: the line of the:!, and in a mapping the tokens before the first key name or bar. A key name such as<Bar>that the shell would read ends the text as well, which leaves a word counted and drops none.fixes: #150
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_shell_text_of_a_bang_ends_with_its_command_lineintests/vim9_excmds.rsfails without the change: all threeMissingreferences were marked as Vim's.What the analyzer reports
The four corpora and the survey report the same as before.
Documentation
Anything reviewers should know
The cloud review of
Developmentagainstmainfound this fault, which #142 brought in. No release holds #142.