##// END OF EJS Templates
Fix bug with autocall and multiline input recalled from readline buffer....
Fernando Perez -
Show More
@@ -427,11 +427,19 b' class PrefilterManager(Component):'
427 427 which is the case when the user goes back to a multiline history
428 428 entry and presses enter.
429 429 """
430 out = []
431 for line in lines.rstrip('\n').split('\n'):
432 out.append(self.prefilter_line(line, continue_prompt))
433 return '\n'.join(out)
434
430 llines = lines.rstrip('\n').split('\n')
431 # We can get multiple lines in one shot, where multiline input 'blends'
432 # into one line, in cases like recalling from the readline history
433 # buffer. We need to make sure that in such cases, we correctly
434 # communicate downstream which line is first and which are continuation
435 # ones.
436 if len(llines) > 1:
437 out = '\n'.join([self.prefilter_line(line, lnum>0)
438 for lnum, line in enumerate(llines) ])
439 else:
440 out = self.prefilter_line(llines[0], continue_prompt)
441
442 return out
435 443
436 444 #-----------------------------------------------------------------------------
437 445 # Prefilter transformers
General Comments 0
You need to be logged in to leave comments. Login now