emacs-31 ca7c8208b79: markdown-ts-mode: Fix computing code block current region (bug#81219)
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: emacs-31 commit ca7c8208b7979df9951c8d63e8f4a638d0b22b66 Author: Stéphane Marks <[email protected]> Commit: Eli Zaretskii <[email protected]> markdown-ts-mode: Fix computing code block current region (bug#81219) This ensures that commands such as 'comment-or-uncomment-region' operate on the correct region in the work buffer. * lisp/textmodes/markdown-ts-mode.el (markdown-ts--run-command-in-code-block): Fix adj-region-beg and adj-region-end. --- lisp/textmodes/markdown-ts-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el index 6b70f2aced9..7486ca2b2c8 100644 --- a/lisp/textmodes/markdown-ts-mode.el +++ b/lisp/textmodes/markdown-ts-mode.el @@ -3214,8 +3214,8 @@ ARGS are captured by `markdown-ts--maybe-run-command-in-code-block'." (region-end (use-region-end)) (adj-point (1+ (- orig-point beg))) (adj-mark (when orig-mark (1+ (- orig-mark beg)))) - (adj-region-beg (when region-beg (1+ (- orig-point region-beg)))) - (adj-region-end (when region-end (1+ (- orig-point region-end)))) + (adj-region-beg (when region-beg (1+ (- region-beg beg)))) + (adj-region-end (when region-end (1+ (- region-end beg)))) (point-delta 0) (ignore-output (memq command markdown-ts-code-block-ignore-output-commands))