emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6e8bee27a5c: Fix offset of reported conversion regions


From: Po Lu
Subject: master 6e8bee27a5c: Fix offset of reported conversion regions
Date: Sun, 12 May 2024 09:44:16 -0400 (EDT)

branch: master
commit 6e8bee27a5cb9915c5db0f8756c8a903e4be1cec
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix offset of reported conversion regions
    
    * src/androidterm.c (request_class, text_class): Pacify new
    warning.
    (android_update_selection): Don't redundantly subtract 1 from
    compose region start.
---
 src/androidterm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/androidterm.c b/src/androidterm.c
index f4c071f4519..e1cd96c9176 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -5707,10 +5707,10 @@ struct android_extracted_text_class
 
 /* Fields and methods associated with the `ExtractedTextRequest'
    class.  */
-struct android_extracted_text_request_class request_class;
+static struct android_extracted_text_request_class request_class;
 
 /* Fields and methods associated with the `ExtractedText' class.  */
-struct android_extracted_text_class text_class;
+static struct android_extracted_text_class text_class;
 
 /* Return an ExtractedText object corresponding to the extracted text
    TEXT.  START is a character position describing the offset of the
@@ -6273,8 +6273,8 @@ android_update_selection (struct frame *f, struct window 
*w)
       end = marker_position (f->conversion.compose_region_end);
 
       /* Offset and detect underflow.  */
-      start = max (start, field_start) - field_start - 1;
-      end = min (end, field_end) - field_start - 1;
+      start = max (start, field_start) - field_start;
+      end = min (end, field_end) - field_start;
       if (end < 0 || start < 0)
        end = start = -1;
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]