Skip to content

CFE-3988: Fixed insert_lines ignoring include_end_delimiter when locating the region (3.27) - #6291

Open
nickanderson wants to merge 1 commit into
cfengine:3.27.xfrom
nickanderson:CFE-3988/3.27.x
Open

CFE-3988: Fixed insert_lines ignoring include_end_delimiter when locating the region (3.27)#6291
nickanderson wants to merge 1 commit into
cfengine:3.27.xfrom
nickanderson:CFE-3988/3.27.x

Conversation

@nickanderson

Copy link
Copy Markdown
Member

Inserting after the last line of a region built with include_end_delimiter => "true" landed above the delimiter instead of below it, because the insertion path treats the region as the half-open range [begin_ptr, end_ptr).

Backport of #6265.

Ticket: CFE-3988

…egion

The insertion path treats the selected region as the half-open range
[begin_ptr, end_ptr), so the end delimiter was never inside it. Inserting
after the last line of a region built with include_end_delimiter => "true"
landed above the end delimiter instead of below it. Insertion now moves the
bound the way DeletePromisedLinesMatching() already does.

That attribute previously had no effect at all on insert_lines, so the
default of inserting before an excluded end delimiter is unchanged.
Acceptance test 31_tickets/CFE-3988/2 covers that default and
31_tickets/CFE-3988/1 is no longer a soft failure.

Ticket: CFE-3988
Changelog: Title
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 7313aa2)
@nickanderson

Copy link
Copy Markdown
Member Author

@cf-bottom jenkins, please

@cf-bottom

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants