Repository : http://git.fedorahosted.org/git/?p=ibus-typing-booster.git
Branch 'master' now includes:
16727e1 Require Python >= 3.3
a17125f Always write xml output in UTF-8 encoding, not in the encoding of the current locale
7349c76 Change class “KeyEvent” to store the keycode as well
2432678 Commit when hitting the borders of the preëdit with the arrow-keys
6b3661e Release 1.2.11
Repository : http://git.fedorahosted.org/git/?p=ibus-typing-booster.git
On branch : master
>---------------------------------------------------------------
commit 6b3661e66414fae5bfcfa65b538bdb563346d33b
Author: Mike FABIAN <mfabian(a)redhat.com>
Date: Wed Sep 24 11:28:13 2014 +0200
Release 1.2.11
>---------------------------------------------------------------
ibus-typing-booster/ChangeLog | 7 +++++++
ibus-typing-booster/configure.ac | 2 +-
ibus-typing-booster/ibus-typing-booster.pc.in | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ibus-typing-booster/ChangeLog b/ibus-typing-booster/ChangeLog
index da68d3e..929a704 100644
--- a/ibus-typing-booster/ChangeLog
+++ b/ibus-typing-booster/ChangeLog
@@ -1,4 +1,11 @@
* Author: Mike FABIAN <mfabian(a)redhat.com>
+* 24 Sep 2014 Released 1.2.11 version
+* Require Python >= 3.3
+* Always write xml output in UTF-8 encoding, not in the encoding of the current locale
+* Change class “KeyEvent” to store the keycode as well
+* Commit when hitting the borders of the preëdit with the arrow keys (Resolves: rhbz#1140502)
+
+* Author: Mike FABIAN <mfabian(a)redhat.com>
* 27 Feb 2014 Released 1.2.10 version
* make profiling work again and make it easier to use
* tiny performance improvement
diff --git a/ibus-typing-booster/configure.ac b/ibus-typing-booster/configure.ac
index 2dcba96..4d77224 100755
--- a/ibus-typing-booster/configure.ac
+++ b/ibus-typing-booster/configure.ac
@@ -24,7 +24,7 @@ m4_define([package_name], [ibus-typing-booster])
m4_define([ibus_released], [1])
m4_define([ibus_major_version], [1])
m4_define([ibus_minor_version], [2])
-m4_define([ibus_micro_version], [10])
+m4_define([ibus_micro_version], [11])
m4_define(ibus_maybe_datestamp,
m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
diff --git a/ibus-typing-booster/ibus-typing-booster.pc.in b/ibus-typing-booster/ibus-typing-booster.pc.in
index 9a89c5d..5e341de 100755
--- a/ibus-typing-booster/ibus-typing-booster.pc.in
+++ b/ibus-typing-booster/ibus-typing-booster.pc.in
@@ -11,7 +11,7 @@ enginedir=/usr/share/ibus/engine
Name: IBus-Typing-Booster
Description: Table Based Input Method Framework for Intelligent Input Bus for Linux / Unix OS
-Version: 1.2.10
+Version: 1.2.11
Requires:
Libs:
Cflags:
Repository : http://git.fedorahosted.org/git/?p=ibus-typing-booster.git
On branch : miketmp-debug
>---------------------------------------------------------------
commit 2432678ec6d29ed66003333c174d1679f1281017
Author: Mike FABIAN <mfabian(a)redhat.com>
Date: Tue Sep 23 13:50:59 2014 +0200
Commit when hitting the borders of the preëdit with the arrow-keys
Resolves: rhbz#1140502 - Commit preedit even if someone press right-left arrow
See: https://bugzilla.redhat.com/show_bug.cgi?id=1140502
Just stopping and ignoring further arrow key presses when the
left or the right end of the preëdit is reached is not so useful.
It seems more useful to commit the preëdit in that case and move
the cursor out of the preëdit.
>---------------------------------------------------------------
ibus-typing-booster/engine/hunspell_table.py | 58 ++++++++++++--------------
1 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/ibus-typing-booster/engine/hunspell_table.py b/ibus-typing-booster/engine/hunspell_table.py
index 3e87a9a..b613196 100644
--- a/ibus-typing-booster/engine/hunspell_table.py
+++ b/ibus-typing-booster/engine/hunspell_table.py
@@ -270,20 +270,6 @@ class editor(object):
'NFC', transliterated_string_up_to_cursor)
return len(transliterated_string_up_to_cursor)
- def arrow_left (self):
- '''
- Move cursor left in the typed string.
- '''
- if self._typed_string_cursor > 0:
- self._typed_string_cursor -= 1
-
- def arrow_right (self):
- '''
- Move cursor right in the typed string.
- '''
- if self._typed_string_cursor < len(self._typed_string):
- self._typed_string_cursor += 1
-
def control_arrow_left (self):
'''
Move cursor to the beginning of the typed string
@@ -890,20 +876,6 @@ class tabengine (IBus.Engine):
self._update_ui()
return True
- if key.val in (IBus.KEY_Left, IBus.KEY_KP_Left):
- if self._editor.is_empty():
- return False
- self._editor.arrow_left()
- self._update_ui()
- return True
-
- if key.val in (IBus.KEY_Right, IBus.KEY_KP_Right):
- if self._editor.is_empty():
- return False
- self._editor.arrow_right ()
- self._update_ui ()
- return True
-
if key.val == IBus.KEY_BackSpace and key.state & IBus.ModifierType.CONTROL_MASK:
if self._editor.is_empty():
return False
@@ -973,9 +945,21 @@ class tabengine (IBus.Engine):
return True
return True
- if key.val in (IBus.KEY_Return, IBus.KEY_KP_Enter, IBus.KEY_space):
+ if key.val in (IBus.KEY_Return, IBus.KEY_KP_Enter, IBus.KEY_space,
+ IBus.KEY_Right, IBus.KEY_KP_Right,
+ IBus.KEY_Left, IBus.KEY_KP_Left):
if self._editor.is_empty():
return False
+ if key.val in (IBus.KEY_Right, IBus.KEY_KP_Right):
+ if self._editor._typed_string_cursor < len(self._editor._typed_string):
+ self._editor._typed_string_cursor += 1
+ self._update_ui()
+ return True
+ if key.val in (IBus.KEY_Left, IBus.KEY_KP_Left):
+ if self._editor._typed_string_cursor > 0:
+ self._editor._typed_string_cursor -= 1
+ self._update_ui()
+ return True
input_phrase = self._editor.get_transliterated_string()
if not input_phrase:
return False
@@ -988,11 +972,23 @@ class tabengine (IBus.Engine):
if self._editor._lookup_table.cursor_visible:
# something is selected in the lookup table, commit
# the selected phrase
- self.commit_string(phrase, input_phrase = input_phrase)
+ commit_string = phrase
else:
# nothing is selected in the lookup table, commit the
# input_phrase
- self.commit_string(input_phrase, input_phrase = input_phrase)
+ commit_string = input_phrase
+ self.commit_string(commit_string, input_phrase = input_phrase)
+ if key.val in (IBus.KEY_Left, IBus.KEY_KP_Left):
+ # After committing, the cursor is at the right side of
+ # the committed string. When the string has been
+ # committed because of arrow-left, the cursor has
+ # to be moved to the left side of the string. This
+ # should be done in a way which works even when
+ # surrounding text is not supported. We can do it by
+ # forwarding as many arrow-left events to the application
+ # as the committed string has characters:
+ for c in commit_string:
+ self.forward_key_event(key.val, key.code, key.state)
return False
# We pass all other hotkeys through: