##// END OF EJS Templates
Oops, need to exit custom completer on empty lbuf, not empty symbol
vivainio -
Show More
@@ -531,9 +531,10 b' class IPCompleter(Completer):'
531
531
532 def dispatch_custom_completer(self,text):
532 def dispatch_custom_completer(self,text):
533 # print "Custom! '%s' %s" % (text, self.custom_completers) # dbg
533 # print "Custom! '%s' %s" % (text, self.custom_completers) # dbg
534 if not text.strip():
534 line = self.full_lbuf
535 if not line.strip():
535 return None
536 return None
536 line = self.lbuf
537
537 event = Struct()
538 event = Struct()
538 event.line = line
539 event.line = line
539 event.symbol = text
540 event.symbol = text
@@ -569,7 +570,8 b' class IPCompleter(Completer):'
569
570
570 # don't apply this on 'dumb' terminals, such as emacs buffers, so we
571 # don't apply this on 'dumb' terminals, such as emacs buffers, so we
571 # don't interfere with their own tab-completion mechanism.
572 # don't interfere with their own tab-completion mechanism.
572 self.lbuf = self.get_line_buffer()[:self.readline.get_endidx()]
573 self.full_lbuf = self.get_line_buffer()
574 self.lbuf = self.full_lbuf[:self.readline.get_endidx()]
573 if not (self.dumb_terminal or self.get_line_buffer().strip()):
575 if not (self.dumb_terminal or self.get_line_buffer().strip()):
574 self.readline.insert_text('\t')
576 self.readline.insert_text('\t')
575 return None
577 return None
General Comments 0
You need to be logged in to leave comments. Login now