Conversation
Problem: Args and tail comments break text-input command parsing in
functions (after v9.1.1607).
Solution: Remove the incorrect trailing-text check and only match the
command name, as was done before v9.1.1607.
Parsing of text-input commands, with count arguments or trailing
comments, in function bodies has been broken since v9.1.1607. The
command's input lines are then parsed as function-body commands.
This removes the partial attempt at argument parsing introduced in the
referenced patch. Attempting to validate the arguments to these
text-input commands is atypical for get_function_body() which only does
enough work to allow for the function's closing command to be
successfully identified. Otherwise, it simply slurps its body commands.
Remove useless/misplaced/duplicate tests.
related: vim#17893
Signed-off-by: Doug Kearns <[email protected]>
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.
Problem: Args and tail comments break text-input command parsing in
functions (after v9.1.1607).
Solution: Remove the incorrect trailing-text check and only match the
command name, as was done before v9.1.1607.
Parsing of text-input commands, with count arguments or trailing
comments, in function bodies has been broken since v9.1.1607. The
command's input lines are then parsed as function-body commands.
This removes the partial attempt at argument parsing introduced in the
referenced patch. Attempting to validate the arguments to these
text-input commands is atypical for get_function_body() which only does
enough work to allow for the function's closing command to be
successfully identified. Otherwise, it simply slurps its body commands.
Remove useless/misplaced/duplicate tests.
related: #17893
This is a simple fix I managed to dig up and split off from a more
comprehensive refactoring of
get_function_body()that fell by the waysideafter 9.1.1607. I'll also split off a followup to fix the same original bug in
heredoc parsing rather than complicate this 'reversion'.