aboutsummaryrefslogtreecommitdiffstats
path: root/src/textconv.c
diff options
context:
space:
mode:
authorPo Lu2023-02-22 14:59:27 +0800
committerPo Lu2023-02-22 14:59:27 +0800
commit1e6f957c0dbb7e4a5e04c20fcb797be1d98df3d8 (patch)
tree0a3919c992ec06af6163833486516f6c38476b5e /src/textconv.c
parent8356412d6259a8fbfa83380ae0f96361d7223f03 (diff)
downloademacs-1e6f957c0dbb7e4a5e04c20fcb797be1d98df3d8.tar.gz
emacs-1e6f957c0dbb7e4a5e04c20fcb797be1d98df3d8.zip
Update Android port
* doc/emacs/input.texi (On-Screen Keyboards): Document changes to text conversion. * java/org/gnu/emacs/EmacsInputConnection.java (getExtractedText) (EmacsInputConnection): * src/keyboard.c (read_key_sequence): Disable text conversion after reading prefix key. * src/textconv.c (get_extracted_text): Fix returned value when request length is zero.
Diffstat (limited to 'src/textconv.c')
-rw-r--r--src/textconv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/textconv.c b/src/textconv.c
index 1ca5f0488f8..4b5f9e01162 100644
--- a/src/textconv.c
+++ b/src/textconv.c
@@ -1462,6 +1462,9 @@ get_extracted_text (struct frame *f, ptrdiff_t n,
1462 /* Figure out the bounds of the text to return. */ 1462 /* Figure out the bounds of the text to return. */
1463 if (n != -1) 1463 if (n != -1)
1464 { 1464 {
1465 /* Make sure n is at least 2. */
1466 n = max (2, n);
1467
1465 start = PT - n / 2; 1468 start = PT - n / 2;
1466 end = PT + n - n / 2; 1469 end = PT + n - n / 2;
1467 } 1470 }