[vim/vim] :append in a block that is not executed reads its text as commands (PR #21331)

5 views
Skip to first unread message

h_east

unread,
Sep 17, 2026, 9:00:23 AM (yesterday) Sep 17
to vim/vim, Subscribed
Problem:  Inside a block that is not executed, "if 0" for one, the text
          of ":append", ":insert" and ":change" is read as commands: the
          commands are not executed while skipping, so nothing reads the
          lines up to the ".".  A text line like "endif" then ends the
          block.  A ":source ++dryrun" has the same problem at the script
          level.
Solution: Execute the three commands while skipping, like ":function",
          and only read the lines up to the "." then.

related: #21257


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21331

Commit Summary

  • 6573587 :append in a block that is not executed reads its text as commands

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21331@github.com>

h_east

unread,
Sep 17, 2026, 9:02:04 AM (yesterday) Sep 17
to vim/vim, Subscribed
h-east left a comment (vim/vim#21331)

@dkearns You said in #21257 (comment) that you had a patch for this, so I waited a few
days before opening this one. If you would rather submit your own, let me
know and I will close this PR.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21331/c5714772922@github.com>

Reply all
Reply to author
Forward
0 new messages