##// END OF EJS Templates
[wxipython shell] Patch from cody precod to correct 'enter' key behaviour under MacOSX
ldufrechou -
r1158:c525ef31 merge
parent child Browse files
Show More
@@ -394,7 +394,6 b' class WxConsoleView(stc.StyledTextCtrl):'
394 394 @return: Return True if event as been catched.
395 395 @rtype: boolean
396 396 '''
397
398 397 if event.GetKeyCode() == wx.WXK_HOME:
399 398 if event.Modifiers == wx.MOD_NONE:
400 399 self.moveCursorOnNewValidKey()
@@ -485,7 +484,7 b' class IPShellWidget(wx.Panel):'
485 484 Instanciate a WxConsoleView.
486 485 Redirect I/O to console.
487 486 '''
488 wx.Panel.__init__(self,parent,-1)
487 wx.Panel.__init__(self,parent,wx.ID_ANY)
489 488
490 489 ### IPython non blocking shell instanciation ###
491 490 self.cout = StringIO()
@@ -517,7 +516,7 b' class IPShellWidget(wx.Panel):'
517 516
518 517 self.cout.write = self.text_ctrl.asyncWrite
519 518
520 self.text_ctrl.Bind(wx.EVT_KEY_DOWN, self.keyPress, self.text_ctrl)
519 self.text_ctrl.Bind(wx.EVT_KEY_DOWN, self.keyPress)
521 520
522 521 ### making the layout of the panel ###
523 522 sizer = wx.BoxSizer(wx.VERTICAL)
@@ -630,7 +629,6 b' class IPShellWidget(wx.Panel):'
630 629 Key press callback with plenty of shell goodness, like history,
631 630 autocompletions, etc.
632 631 '''
633
634 632 if event.GetKeyCode() == ord('C'):
635 633 if event.Modifiers == wx.MOD_CONTROL:
636 634 if self.cur_state == 'WAIT_END_OF_EXECUTION':
@@ -644,6 +642,7 b' class IPShellWidget(wx.Panel):'
644 642 self.setCurrentState('DO_EXECUTE_LINE')
645 643 self.stateDoExecuteLine()
646 644 return
645
647 646 if self.pager_state == 'WAITING':
648 647 self.pager_state = 'PROCESS_LINES'
649 648 self.pager(self.doc)
General Comments 0
You need to be logged in to leave comments. Login now