diff options
Diffstat (limited to 'GstDebugViewer')
-rw-r--r-- | GstDebugViewer/Plugins/FindBar.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/GstDebugViewer/Plugins/FindBar.py b/GstDebugViewer/Plugins/FindBar.py index 46e9450..234a6a2 100644 --- a/GstDebugViewer/Plugins/FindBar.py +++ b/GstDebugViewer/Plugins/FindBar.py @@ -43,9 +43,15 @@ class SearchOperation (object): message = model_row[col_id] if search_text in message: - # TODO: Return all match ranges here. - pos = message.find (search_text) - return ((pos, pos + len_search_text,),) + ranges = [] + start = 0 + while True: + pos = message.find (search_text, start) + if pos == -1: + break + ranges.append ((pos, pos + len_search_text,)) + start = pos + len_search_text + return ranges else: return () |