From: Po Lu Date: Thu, 1 Jun 2023 02:05:42 +0000 (+0800) Subject: Update Android port X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9a958c59a2ce546e6ec99c58ca181dafeac8dd6b;p=emacs.git Update Android port * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection): Add compatibility adjustments for Samsung devices. --- diff --git a/java/org/gnu/emacs/EmacsInputConnection.java b/java/org/gnu/emacs/EmacsInputConnection.java index 420da58c0f8..54c98d950aa 100644 --- a/java/org/gnu/emacs/EmacsInputConnection.java +++ b/java/org/gnu/emacs/EmacsInputConnection.java @@ -65,6 +65,13 @@ public final class EmacsInputConnection extends BaseInputConnection if (Build.MANUFACTURER.equalsIgnoreCase ("Huawei") || Build.MANUFACTURER.equalsIgnoreCase ("Honor")) extractAbsoluteOffsets = syncAfterCommit = true; + + /* The Samsung keyboard takes `selectionStart' at face value if + some text is returned, and also searches for words solely + within that text. However, when no text is returned, it falls + back to getTextAfterCursor and getTextBeforeCursor. */ + if (Build.MANUFACTURER.equalsIgnoreCase ("Samsung")) + extractAbsoluteOffsets = true; }; public