diff options
| author | Po Lu | 2024-05-12 21:42:52 +0800 |
|---|---|---|
| committer | Po Lu | 2024-05-12 21:43:58 +0800 |
| commit | 6e8bee27a5cb9915c5db0f8756c8a903e4be1cec (patch) | |
| tree | f637de79989079a97c96cdb817fb7e75c05a4286 /src/androidterm.c | |
| parent | 9d7b22fcb408b3d864d4d74d14ab428a2706b45d (diff) | |
| download | emacs-6e8bee27a5cb9915c5db0f8756c8a903e4be1cec.tar.gz emacs-6e8bee27a5cb9915c5db0f8756c8a903e4be1cec.zip | |
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.
Diffstat (limited to 'src/androidterm.c')
| -rw-r--r-- | src/androidterm.c | 8 |
1 files 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 | |||
| 5707 | 5707 | ||
| 5708 | /* Fields and methods associated with the `ExtractedTextRequest' | 5708 | /* Fields and methods associated with the `ExtractedTextRequest' |
| 5709 | class. */ | 5709 | class. */ |
| 5710 | struct android_extracted_text_request_class request_class; | 5710 | static struct android_extracted_text_request_class request_class; |
| 5711 | 5711 | ||
| 5712 | /* Fields and methods associated with the `ExtractedText' class. */ | 5712 | /* Fields and methods associated with the `ExtractedText' class. */ |
| 5713 | struct android_extracted_text_class text_class; | 5713 | static struct android_extracted_text_class text_class; |
| 5714 | 5714 | ||
| 5715 | /* Return an ExtractedText object corresponding to the extracted text | 5715 | /* Return an ExtractedText object corresponding to the extracted text |
| 5716 | TEXT. START is a character position describing the offset of the | 5716 | TEXT. START is a character position describing the offset of the |
| @@ -6273,8 +6273,8 @@ android_update_selection (struct frame *f, struct window *w) | |||
| 6273 | end = marker_position (f->conversion.compose_region_end); | 6273 | end = marker_position (f->conversion.compose_region_end); |
| 6274 | 6274 | ||
| 6275 | /* Offset and detect underflow. */ | 6275 | /* Offset and detect underflow. */ |
| 6276 | start = max (start, field_start) - field_start - 1; | 6276 | start = max (start, field_start) - field_start; |
| 6277 | end = min (end, field_end) - field_start - 1; | 6277 | end = min (end, field_end) - field_start; |
| 6278 | if (end < 0 || start < 0) | 6278 | if (end < 0 || start < 0) |
| 6279 | end = start = -1; | 6279 | end = start = -1; |
| 6280 | } | 6280 | } |