Adding filted in Auto-completion of TextViewer
authorlbessard
Wed, 25 Feb 2009 16:06:19 +0100
changeset 312 eab54dae434d
parent 311 3e22e53878b8
child 313 9266d1e6e3d4
Adding filted in Auto-completion of TextViewer
TextViewer.py
--- a/TextViewer.py	Wed Feb 25 16:05:45 2009 +0100
+++ b/TextViewer.py	Wed Feb 25 16:06:19 2009 +0100
@@ -497,6 +497,8 @@
             else:
                 kw = self.Keywords + self.Variables.keys() + self.Functions
             if len(kw) > 0:
+                if len(words[-1]) > 0:
+                    kw = [keyword for keyword in kw if keyword.startswith(words[-1])]
                 kw.sort()
                 self.AutoCompSetIgnoreCase(True)
                 self.AutoCompShow(len(words[-1]), " ".join(kw))