TextViewer.py
changeset 312 eab54dae434d
parent 308 bf1facfd1d36
child 342 25e093542b40
equal deleted inserted replaced
311:3e22e53878b8 312:eab54dae434d
   495                     else:
   495                     else:
   496                         kw = self.Variables.keys()
   496                         kw = self.Variables.keys()
   497             else:
   497             else:
   498                 kw = self.Keywords + self.Variables.keys() + self.Functions
   498                 kw = self.Keywords + self.Variables.keys() + self.Functions
   499             if len(kw) > 0:
   499             if len(kw) > 0:
       
   500                 if len(words[-1]) > 0:
       
   501                     kw = [keyword for keyword in kw if keyword.startswith(words[-1])]
   500                 kw.sort()
   502                 kw.sort()
   501                 self.AutoCompSetIgnoreCase(True)
   503                 self.AutoCompSetIgnoreCase(True)
   502                 self.AutoCompShow(len(words[-1]), " ".join(kw))
   504                 self.AutoCompShow(len(words[-1]), " ".join(kw))
   503         else:
   505         else:
   504             wx.CallAfter(self.RefreshModel)
   506             wx.CallAfter(self.RefreshModel)