From da5ef57fe475dbbe68c9eaad48f24ca3f46867b0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 26 Jun 2022 19:35:57 +0300 Subject: [PATCH] * lisp/simple.el (delete-forward-char): Fix bug #56237. --- lisp/simple.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 2b11a6362fd..a750eed72b8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1508,7 +1508,10 @@ the actual saved text might be different from what was killed." ;; 'find-composition' will return (FROM TO ....) or nil. (setq cmp (find-composition pos)) (if cmp - (setq pos (cadr cmp)) + ;; TO can be at POS, in which case we want to make + ;; sure we advance at least by 1 character. + (let ((cmp-end (cadr cmp))) + (setq pos (max (1+ pos) cmp-end))) (setq pos (1+ pos))) (setq n (1- n))) (delete-char (- pos start) killflag))) -- 2.39.5