eval_region should deactivte mark when succeeded#195
Conversation
There was a problem hiding this comment.
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_markcall after the eval and message operations in theeval_regioncommand
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.
No description provided.