aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-03-14 13:19:01 +0800
committerPo Lu2023-03-14 13:19:01 +0800
commitd6bddca26c7cf827e098ae783e865fcbcdd48799 (patch)
treeaba22e667c97e4418e84171309f46b9f2e4e7509 /src
parent5964051fcefc52e02c88a41b91797cc7a785d550 (diff)
downloademacs-d6bddca26c7cf827e098ae783e865fcbcdd48799.tar.gz
emacs-d6bddca26c7cf827e098ae783e865fcbcdd48799.zip
Update Android port
* java/org/gnu/emacs/EmacsWindow.java (figureChange): Detect mice on up events as well. (onSomeKindOfMotionEvent): Work past framework bug. * src/androidterm.c (android_perform_conversion_query): * src/textconv.c (textconv_query): * src/textconv.h (TEXTCONV_SKIP_ACTIVE_REGION): Remove unused code.
Diffstat (limited to 'src')
-rw-r--r--src/androidterm.c4
-rw-r--r--src/textconv.c34
-rw-r--r--src/textconv.h1
3 files changed, 1 insertions, 38 deletions
diff --git a/src/androidterm.c b/src/androidterm.c
index 72d81744128..0110c4b6dd8 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -4685,8 +4685,6 @@ struct android_conversion_query_context
4685/* Obtain the text from the frame whose window is that specified in 4685/* Obtain the text from the frame whose window is that specified in
4686 DATA using the text conversion query specified there. 4686 DATA using the text conversion query specified there.
4687 4687
4688 Adjust the query position to skip over any active composing region.
4689
4690 Set ((struct android_conversion_query_context *) DATA)->success on 4688 Set ((struct android_conversion_query_context *) DATA)->success on
4691 success. */ 4689 success. */
4692 4690
@@ -4704,7 +4702,7 @@ android_perform_conversion_query (void *data)
4704 if (!f) 4702 if (!f)
4705 return; 4703 return;
4706 4704
4707 textconv_query (f, &context->query, TEXTCONV_SKIP_ACTIVE_REGION); 4705 textconv_query (f, &context->query, 0);
4708 4706
4709 /* context->query.text will have been set even if textconv_query 4707 /* context->query.text will have been set even if textconv_query
4710 returns 1. */ 4708 returns 1. */
diff --git a/src/textconv.c b/src/textconv.c
index 900277016f2..91f6e861c60 100644
--- a/src/textconv.c
+++ b/src/textconv.c
@@ -147,9 +147,6 @@ select_window (Lisp_Object window, Lisp_Object norecord)
147 If FLAGS & TEXTCONV_SKIP_CONVERSION_REGION, then first move PT past 147 If FLAGS & TEXTCONV_SKIP_CONVERSION_REGION, then first move PT past
148 the conversion region in the specified direction if it is inside. 148 the conversion region in the specified direction if it is inside.
149 149
150 If FLAGS & TEXTCONV_SKIP_ACTIVE_REGION, then also move PT past the
151 region if the mark is active.
152
153 Value is 0 if QUERY->operation was not TEXTCONV_SUBSTITUTION 150 Value is 0 if QUERY->operation was not TEXTCONV_SUBSTITUTION
154 or if deleting the text was successful, and 1 otherwise. */ 151 or if deleting the text was successful, and 1 otherwise. */
155 152
@@ -234,37 +231,6 @@ textconv_query (struct frame *f, struct textconv_callback_struct *query,
234 } 231 }
235 } 232 }
236 233
237 /* Likewise for the region if the mark is active. */
238
239 if (flags & TEXTCONV_SKIP_ACTIVE_REGION)
240 {
241 temp = mark;
242
243 if (temp == -1)
244 goto escape;
245
246 start = min (temp, PT);
247 end = max (temp, PT);
248
249 if (pos >= start && pos < end)
250 {
251 switch (query->direction)
252 {
253 case TEXTCONV_FORWARD_CHAR:
254 case TEXTCONV_FORWARD_WORD:
255 case TEXTCONV_CARET_DOWN:
256 case TEXTCONV_NEXT_LINE:
257 case TEXTCONV_LINE_START:
258 pos = end;
259 break;
260
261 default:
262 pos = max (BEGV, start);
263 break;
264 }
265 }
266 }
267
268 escape: 234 escape:
269 235
270 /* If pos is outside the accessible part of the buffer or if it 236 /* If pos is outside the accessible part of the buffer or if it
diff --git a/src/textconv.h b/src/textconv.h
index 9bc9e7d9bd1..6abca97bc52 100644
--- a/src/textconv.h
+++ b/src/textconv.h
@@ -119,7 +119,6 @@ struct textconv_callback_struct
119}; 119};
120 120
121#define TEXTCONV_SKIP_CONVERSION_REGION (1 << 0) 121#define TEXTCONV_SKIP_CONVERSION_REGION (1 << 0)
122#define TEXTCONV_SKIP_ACTIVE_REGION (1 << 1)
123 122
124extern int textconv_query (struct frame *, struct textconv_callback_struct *, 123extern int textconv_query (struct frame *, struct textconv_callback_struct *,
125 int); 124 int);