https://bugzilla.redhat.com/show_bug.cgi?id=1847347
Bug ID: 1847347
Summary: gnome-terminal and xfce4-terminal get surrounding text
from previous application
Product: Fedora
Version: 32
Status: NEW
Component: ibus
Assignee: tfujiwar(a)redhat.com
Reporter: mfabian(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: i18n-bugs(a)lists.fedoraproject.org,
shawn.p.huang(a)gmail.com, tfujiwar(a)redhat.com
Target Milestone: ---
Classification: Fedora
I made the following screenshots and video by testing on Gnome-Xorg, but the
problem occurs on Gnome-Wayland as well.
How to reproduce (see also attached screenshots and video):
- To show what happens with the surrounding text, I first opened the
setup tool of ibus-typing-booster and set the debug level in the
options tab to 3.
When the debug level is high, the auxiliary text above the candidate
list shows what context has been obtained by using surrounding text
(if surrounding text is available, if it is not available like when
using xterm, the context is just remembered from what was typed
last).
- I opened 3 windows: gedit, firefox, and gnome-terminal.
- I focus on gedit and type "a b c d e"
On top of the candidate list one can see: "Context: b c d"
This is because when the letter "e" was typed, ibus-typing-booster
got the surrounding text at the cursor position and parsed the last
3 tokens left of the cursor out of the result. And these
last 3 tokens left of the cursor are "b c d".
- Now I focus on firefox and type "f g h i j"
On top of the candidate list one can see: "Context: g h i"
I.e. the correct context "g h i" to the left of the just typed "j"
(which is still in preedit) has been found using surrounding text.
- Now I focus on gnome-terminal and type "k l m"
On top of the candidate list one can see: "Context h i j"
This comes from the surrounding text left of the cursor in
*firefox*, *not* from gnome-terminal.
Although gnome-terminal reports that surrounding text is supported, i.e.
self.client_capabilities & IBus.Capabilite.SURROUNDING_TEXT
is True (see the code to get the context at:
https://github.com/mike-fabian/ibus-typing-booster/blob/master/engine/hun...
)
gnome-terminal does not really seem to support surrounding text.
The surrounding text comes from the previous client which really supported
surrounding text.
If the previous client was firefox, one still gets the surrounding text from
firefox while typing in gnome-terminal.
Same with gedit, if the previous client before focussing on gnome-terminal
was gedit, one still gets the surrounding text from gedit while typing in
gnome-terminal.
- The same problem occurs when using xfce4-terminal instead of gnome-terminal.
- When using xterm, the problem does *not* occur because when using xterm
self.client_capabilities & IBus.Capabilite.SURROUNDING_TEXT
is False and then the get_context() immediately returns and the context
remembered from the last text typed is used as a fallback.
--
You are receiving this mail because:
You are on the CC list for the bug.