GNOME Bugzilla – Bug 345858
gettextproperty function returns nothing if startpos is > 0
Last modified: 2006-07-06 17:13:06 UTC
Please describe the problem: The function gettextproperty (Syntax : gettextproperty(windowName, componentName, startPosition=None, endPosition=None)) does not return anything when the start position is greater than 0 (i.e text is not at start of the box), even when text forecolor or backcolor is changed. Steps to reproduce: 1. Open gedit, type some text 2. Search for some text, such that the text is not at the start of the document.The text should be highlighted now. 3. in a python shell, type from ldtp import * and gettextproperty('*gedit','txt0',5,10) (assuming the text searched for in gedit was from position 5 to position 10) Actual results: No output from gettextproperty Expected results: output should be bg-color:65535,65535,30840 .. (gedit 2.14 uses yellow color to highlight a search term).. U can get this output if u search for some text at the start of the document, and specifying start position as 0 Does this happen every time? every Other information:
Created attachment 67966 [details] [review] The arguments given to AccessibleText_getAttributes was wrong AccessibleText_getAttributes doesn't seem to be taking the end position i.e. the diff value into account. It only check the start position