Skip to content

eval_region should deactivte mark when succeeded#195

Merged
shugo merged 1 commit intomainfrom
fix/eval_region-deactivate_mark
Feb 22, 2026
Merged

eval_region should deactivte mark when succeeded#195
shugo merged 1 commit intomainfrom
fix/eval_region-deactivate_mark

Conversation

@shugo
Copy link
Owner

@shugo shugo commented Feb 22, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an explicit call to buffer.deactivate_mark after successfully evaluating a region in the eval_region command. The PR title indicates the intention is to deactivate the mark when the operation succeeds (though there's a typo: "deactivte" instead of "deactivate").

Changes:

  • Added buffer.deactivate_mark call after the eval and message operations in the eval_region command
Comments suppressed due to low confidence (1)

lib/textbringer/commands/misc.rb:58

  • This explicit deactivate_mark call deviates from the established pattern in this codebase. Other region-based commands like copy_region, kill_region, delete_region, fill_region, and the ucs_normalize_*_region commands do not explicitly call deactivate_mark - they rely on TransientMarkMode's PRE_COMMAND_HOOK to automatically deactivate marks.

If the intention is to always deactivate the mark after eval_region regardless of whether TransientMarkMode is enabled, this should be documented. Otherwise, consider whether this explicit call is necessary, as TransientMarkMode will already deactivate the mark (since eval_region is not in MARK_PRESERVING_COMMANDS).

      buffer.deactivate_mark

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shugo shugo merged commit 7fbfa7f into main Feb 22, 2026
11 checks passed
@shugo shugo deleted the fix/eval_region-deactivate_mark branch February 22, 2026 13:30
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.

2 participants