From: Eli Zaretskii Date: Sun, 26 Jun 2022 16:35:57 +0000 (+0300) Subject: * lisp/simple.el (delete-forward-char): Fix bug #56237. X-Git-Tag: emacs-29.0.90~1447^2~1442 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da5ef57fe475dbbe68c9eaad48f24ca3f46867b0;p=emacs.git * lisp/simple.el (delete-forward-char): Fix bug #56237. --- 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)))