John Finlay wrote:
Looks OK to me except last line should be:
start = matchEnd
And I would create the tag in an initialization method.
Thanks, I'll adjust accordingly.
Are you sure that searchStr is in buffer?
No it wasn't. In fact, nothing was in the text buffer. Here was
Rich Burridge wrote:
Hi all,
I'm trying to write a function that will highlight all occurances of the
string searchStr in the TextBuffer buffer. This is what I've currently
got
that doesn't work.
def highlightText(buffer, searchStr):
buffer.create_tag("red_foreground", foreground="red"
Hi all,
I'm trying to write a function that will highlight all occurances of the
string searchStr in the TextBuffer buffer. This is what I've currently got
that doesn't work.
def highlightText(buffer, searchStr):
buffer.create_tag("red_foreground", foreground="red")
start, end = buffer