After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156161 - AccessibleText_getTextAtOffset returns wrong values in gnome-terminal
AccessibleText_getTextAtOffset returns wrong values in gnome-terminal
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other Solaris
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
AP1
: 155732 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-10-22 14:55 UTC by Dana Ormenisan
Modified: 2007-01-22 18:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Propsoed patch (3.49 KB, patch)
2004-10-26 10:44 UTC, padraig.obriain
none Details | Review
Updated patch (3.69 KB, patch)
2004-10-27 12:47 UTC, padraig.obriain
none Details | Review

Description Dana Ormenisan 2004-10-22 14:55:47 UTC
AccessibleText_getTextAtOffset (called with the current offset and with
SPI_TEXT_BOUNDARY_WORD_END) returns wrong values:

   1. In the lines containing the prompt, AccessibleText_getTextAtOffset returns
   a wrong value for endOffset. This value is the same as for startOffset 
   (startOffset is correctly reported). As a consequence, the returned string is 
   allways empty.

   2. In the lines which doesn't conatain the prompt following problems appears:
       word1<space><space>word2 (the start offset is 0).
      If AccessibleText_getTextAtOffset is called with offset 0, the correct 
      values are reported: startOffset = 0
                           endOffset   = 7
                           text        = word1
      If AccessibleText_getTextAtOffset is called with offset 7 (the endOffset 
      of the previous word), the wrong values are reported: 
                           startOffset = 0
                           endOffset   = 7
                           text        = word1


This problems are the cause of gnopernicus bug # 155732.
Comment 1 padraig.obriain 2004-10-22 15:00:13 UTC
The problem is in vte.
Comment 2 padraig.obriain 2004-10-22 15:20:03 UTC
The code in question is vte_terminal_accessible_get_text_somewhere(). The code
for ATK_TEXT_BOUNDARY_WORD_START and ATK_TEXT_BOUNDARY_WORD_END is the same.
This is not correct.
Comment 3 padraig.obriain 2004-10-26 10:44:38 UTC
Created attachment 33066 [details] [review]
Propsoed patch

This patch provides implementation for ATK_TEXT_BOUNDARY_WORD_END.

Does it fix the problem?
Comment 4 Alexandra Telescu 2004-10-26 13:22:33 UTC
I managed to reproduce this bug on Linux system by mapping the command ('read
whole window') on a key (G for example). 
I applied this patch and it seems to solve the problem for Linux systems.

I wasn't able to test it on Solaris, because 'ncurses' or 'curses' or
'libtermcap' must be installed in order to build 'vte'. How can I get those modules?
Comment 5 Dana Ormenisan 2004-10-27 11:29:23 UTC
*** Bug 155732 has been marked as a duplicate of this bug. ***
Comment 6 padraig.obriain 2004-10-27 12:47:22 UTC
Created attachment 33120 [details] [review]
Updated patch

Corrects implementation for WORD_START.
Comment 7 bill.haneman 2005-11-01 17:24:03 UTC
Seeking permission to apply... this is the annual (!) ping...
Comment 8 Calum Benson 2006-04-26 17:15:50 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 9 Behdad Esfahbod 2007-01-22 17:51:45 UTC
Same here.  Chris, feel free to commit.
Comment 10 Chris Wilson 2007-01-22 18:06:53 UTC
r1495: 2007-01-22  Chris Wilson <chris@chris-wilson.co.uk>

	Bug 156161 – AccessibleText_getTextAtOffset returns wrong values in gnome-terminal

	The code for ATK_TEXT_BOUNDARY_WORD_START and
	ATK_TEXT_BOUNDARY_WORD_END is the same.

	Patch by <padraig.obriain@sun.com>

	* src/vteaccess.c: (vte_terminal_accessible_get_text_somewhere):
		Actually provide an implementation for
		ATK_TEXT_BOUNDARY_WORD_END.