]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix minor issues in textconv.c
authorPo Lu <luangruo@yahoo.com>
Mon, 27 May 2024 09:59:36 +0000 (17:59 +0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 27 May 2024 20:27:33 +0000 (22:27 +0200)
* src/textconv.c (really_commit_text): Introduce a few
additional debugging printouts.
(locate_and_save_position_in_field): Fix typo.

(cherry picked from commit 435df51d1e7bffd768de15a6c91b7d6f7baa5cbf)

src/textconv.c

index 06d9af335c5a0f6c78256333f01048b485717bf9..0e43bd9d45883fe6d3c818e20a9cc06333ebe24b 100644 (file)
@@ -632,6 +632,7 @@ really_commit_text (struct frame *f, EMACS_INT position,
      otherwise.  */
 
   mark = get_mark ();
+  TEXTCONV_DEBUG ("the mark is: %zd", mark);
   if (MARKERP (f->conversion.compose_region_start) || mark != -1)
     {
       /* Replace its contents.  Set START and END to the start and end
@@ -649,6 +650,9 @@ really_commit_text (struct frame *f, EMACS_INT position,
          end = max (mark, PT);
        }
 
+      TEXTCONV_DEBUG ("replacing text in composing region: %zd, %zd",
+                     start, end);
+
       /* If it transpires that the start of the compose region is not
         point, move point there.  */
 
@@ -1204,7 +1208,7 @@ locate_and_save_position_in_field (struct frame *f, struct window *w,
            {
              TEXTCONV_DEBUG ("confined composing region to %td, %td",
                              newstart, newend);
-             Fset_marker (f->conversion.compose_region_end,
+             Fset_marker (f->conversion.compose_region_start,
                           make_fixed_natnum (newstart), Qnil);
              Fset_marker (f->conversion.compose_region_end,
                           make_fixed_natnum (newend), Qnil);