Skip to content

Adjust region line counting when ending at the beginning of a line#647

Open
bcc32 wants to merge 1 commit into
xenodium:mainfrom
bcc32:get-region-context-avoid-extra-line
Open

Adjust region line counting when ending at the beginning of a line#647
bcc32 wants to merge 1 commit into
xenodium:mainfrom
bcc32:get-region-context-avoid-extra-line

Conversation

@bcc32

@bcc32 bcc32 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

If a region contains some number of whole lines including the final
newline, avoid including the rest of the line that the region-end is
"on".

Fix #646

Checklist

  • I agree to communicate (PR description and comments) with the author myself (not AI-generated).
  • I've reviewed all code in PR myself and will vouch for its quality.
  • I've read and followed the Contributing guidelines.
  • I've filed a feature request/discussion for a new feature.
  • I'm making visual changes, so I'm including screenshots so you can view and discuss.
  • I've added tests where applicable.
  • I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.

If a region contains some number of whole lines including the final
newline, avoid including the rest of the line that the region-end is
"on".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent-shell--get-region-context inserts a snippet that includes an extra line

1 participant