commit
85b13bfda6
@ -0,0 +1 @@
|
|||||||
|
SOURCES/ibus-typing-booster-2.1.0.tar.gz
|
@ -0,0 +1 @@
|
|||||||
|
9a6ab2f7a8aed0beb7faeba706acbca7e1d197d9 SOURCES/ibus-typing-booster-2.1.0.tar.gz
|
@ -0,0 +1,50 @@
|
|||||||
|
From 956b0cf51f7d3803bb605695c4ccc6fea77524a8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike FABIAN <mfabian@redhat.com>
|
||||||
|
Date: Thu, 27 Feb 2020 15:50:37 +0100
|
||||||
|
Subject: [PATCH] =?UTF-8?q?Prevent=20also=20BackSpace=20from=20reopening?=
|
||||||
|
=?UTF-8?q?=20a=20preedit=20when=20the=20option=20=E2=80=9CArrow=20keys=20?=
|
||||||
|
=?UTF-8?q?can=20reopen=20a=20preedit=E2=80=9D=20is=20off?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Reopening the preedit is so terribly buggy, especially under Gnome Wayland
|
||||||
|
but also in many other applications.
|
||||||
|
|
||||||
|
Often surrounding text is reported as supported by the application but
|
||||||
|
ibus-typing-booster then gets completely wrong results when querying
|
||||||
|
the surrounding text. Without properly working surrounding text,
|
||||||
|
reopening a preedit cannot work correctly either.
|
||||||
|
|
||||||
|
Until now this option switched reopening the preedit on and off only for the arrow keys.
|
||||||
|
So even when this was switched off for the arrow keys, it was still causing problems
|
||||||
|
when using backspace in case of broken support for surrounding text.
|
||||||
|
|
||||||
|
Now reopening preedits is disabled completely when this option is off, which is
|
||||||
|
better in most cases as surrounding text is so terribly broken.
|
||||||
|
|
||||||
|
One can still turn it on, it might be helpful in some cases where
|
||||||
|
surrounding text works reasonably well (e.g. in gedit when using Xorg
|
||||||
|
and not Wayland). But in most cases it is unfortunately better to
|
||||||
|
switch this off.
|
||||||
|
---
|
||||||
|
engine/hunspell_table.py | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/engine/hunspell_table.py b/engine/hunspell_table.py
|
||||||
|
index 9214254..e3b61cf 100644
|
||||||
|
--- a/engine/hunspell_table.py
|
||||||
|
+++ b/engine/hunspell_table.py
|
||||||
|
@@ -2396,7 +2396,8 @@ class TypingBoosterEngine(IBus.Engine):
|
||||||
|
return self._return_false(key.val, key.code, key.state)
|
||||||
|
if (not self._arrow_keys_reopen_preedit
|
||||||
|
and key.val in (IBus.KEY_Left, IBus.KEY_KP_Left,
|
||||||
|
- IBus.KEY_Right, IBus.KEY_KP_Right)):
|
||||||
|
+ IBus.KEY_Right, IBus.KEY_KP_Right,
|
||||||
|
+ IBus.KEY_BackSpace)):
|
||||||
|
# using arrows key to reopen the preëdit is disabled
|
||||||
|
return self._return_false(key.val, key.code, key.state)
|
||||||
|
if (key.shift
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
diff -ru ibus-typing-booster-2.1.0.orig/tests/run_tests.in ibus-typing-booster-2.1.0/tests/run_tests.in
|
||||||
|
--- ibus-typing-booster-2.1.0.orig/tests/run_tests.in 2018-06-05 11:32:44.000000000 +0200
|
||||||
|
+++ ibus-typing-booster-2.1.0/tests/run_tests.in 2020-06-09 17:52:21.789989905 +0200
|
||||||
|
@@ -21,6 +21,21 @@
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
+# pip3 install tap.py --user
|
||||||
|
+IMPORT_TAP_SUCCESSFUL = False
|
||||||
|
+try:
|
||||||
|
+ from tap import TAPTestRunner
|
||||||
|
+ IMPORT_TAP_SUCCESSFUL = True
|
||||||
|
+except (ImportError,):
|
||||||
|
+ pass
|
||||||
|
+
|
||||||
|
+if 'IBUS_TYPING_BOOSTER_LOCATION' in os.environ:
|
||||||
|
+ location_path = os.environ['IBUS_TYPING_BOOSTER_LOCATION']
|
||||||
|
+ if location_path != None and location_path != '':
|
||||||
|
+ engine_path = os.path.join(location_path, 'engine')
|
||||||
|
+ sys.path.append(engine_path)
|
||||||
|
+sys.path.append('/usr/share/ibus-typing-booster/engine')
|
||||||
|
+
|
||||||
|
from gi import require_version
|
||||||
|
require_version('IBus', '1.0')
|
||||||
|
from gi.repository import IBus
|
||||||
|
@@ -182,10 +197,25 @@
|
||||||
|
sys.modules["gi.repository.IBus"].PropList = MockPropList
|
||||||
|
|
||||||
|
# -- Load and run our unit tests ---------------------------------------------
|
||||||
|
-os.environ['IBUS_TYPING_BOOSTER_DEBUG_LEVEL'] = '255'
|
||||||
|
+pattern = 'test*.py'
|
||||||
|
+start_dir = os.path.dirname(__file__)
|
||||||
|
+if len(sys.argv) > 1:
|
||||||
|
+ pattern = sys.argv[-1]
|
||||||
|
+ dir = os.path.dirname(pattern)
|
||||||
|
+ pattern = os.path.basename(pattern)
|
||||||
|
+ if dir != '.':
|
||||||
|
+ start_dir = os.path.join(start_dir, dir)
|
||||||
|
loader = unittest.TestLoader()
|
||||||
|
-suite = loader.discover(".")
|
||||||
|
-runner = unittest.TextTestRunner(stream = sys.stderr, verbosity = 255)
|
||||||
|
+suite = loader.discover(start_dir=start_dir, pattern=pattern)
|
||||||
|
+
|
||||||
|
+if IMPORT_TAP_SUCCESSFUL:
|
||||||
|
+ runner = TAPTestRunner(stream=sys.stderr, verbosity=255)
|
||||||
|
+ runner.set_outdir('.')
|
||||||
|
+ runner.set_format('Hi: {method_name} - {short_description}')
|
||||||
|
+ runner.set_combined(True)
|
||||||
|
+else:
|
||||||
|
+ runner = unittest.TextTestRunner(stream=sys.stderr, verbosity=255)
|
||||||
|
+
|
||||||
|
result = runner.run(suite)
|
||||||
|
|
||||||
|
if result.failures or result.errors:
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue