##// 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 532 def dispatch_custom_completer(self,text):
533 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 536 return None
536 line = self.lbuf
537
537 538 event = Struct()
538 539 event.line = line
539 540 event.symbol = text
@@ -569,7 +570,8 b' class IPCompleter(Completer):'
569 570
570 571 # don't apply this on 'dumb' terminals, such as emacs buffers, so we
571 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 575 if not (self.dumb_terminal or self.get_line_buffer().strip()):
574 576 self.readline.insert_text('\t')
575 577 return None
General Comments 0
You need to be logged in to leave comments. Login now