]> git.eshelyaron.com Git - emacs.git/commitdiff
Update Android port
authorPo Lu <luangruo@yahoo.com>
Thu, 1 Jun 2023 02:05:42 +0000 (10:05 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 1 Jun 2023 02:05:42 +0000 (10:05 +0800)
* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection): Add compatibility adjustments for
Samsung devices.

java/org/gnu/emacs/EmacsInputConnection.java

index 420da58c0f8b8d8e1e9200ad9cd7dd9d86e27dfe..54c98d950aa498bbb5ba719809db637734d6f05e 100644 (file)
@@ -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