##// 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 @return: Return True if event as been catched.
394 @return: Return True if event as been catched.
395 @rtype: boolean
395 @rtype: boolean
396 '''
396 '''
397
398 if event.GetKeyCode() == wx.WXK_HOME:
397 if event.GetKeyCode() == wx.WXK_HOME:
399 if event.Modifiers == wx.MOD_NONE:
398 if event.Modifiers == wx.MOD_NONE:
400 self.moveCursorOnNewValidKey()
399 self.moveCursorOnNewValidKey()
@@ -485,7 +484,7 b' class IPShellWidget(wx.Panel):'
485 Instanciate a WxConsoleView.
484 Instanciate a WxConsoleView.
486 Redirect I/O to console.
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 ### IPython non blocking shell instanciation ###
489 ### IPython non blocking shell instanciation ###
491 self.cout = StringIO()
490 self.cout = StringIO()
@@ -517,7 +516,7 b' class IPShellWidget(wx.Panel):'
517
516
518 self.cout.write = self.text_ctrl.asyncWrite
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 ### making the layout of the panel ###
521 ### making the layout of the panel ###
523 sizer = wx.BoxSizer(wx.VERTICAL)
522 sizer = wx.BoxSizer(wx.VERTICAL)
@@ -630,7 +629,6 b' class IPShellWidget(wx.Panel):'
630 Key press callback with plenty of shell goodness, like history,
629 Key press callback with plenty of shell goodness, like history,
631 autocompletions, etc.
630 autocompletions, etc.
632 '''
631 '''
633
634 if event.GetKeyCode() == ord('C'):
632 if event.GetKeyCode() == ord('C'):
635 if event.Modifiers == wx.MOD_CONTROL:
633 if event.Modifiers == wx.MOD_CONTROL:
636 if self.cur_state == 'WAIT_END_OF_EXECUTION':
634 if self.cur_state == 'WAIT_END_OF_EXECUTION':
@@ -644,6 +642,7 b' class IPShellWidget(wx.Panel):'
644 self.setCurrentState('DO_EXECUTE_LINE')
642 self.setCurrentState('DO_EXECUTE_LINE')
645 self.stateDoExecuteLine()
643 self.stateDoExecuteLine()
646 return
644 return
645
647 if self.pager_state == 'WAITING':
646 if self.pager_state == 'WAITING':
648 self.pager_state = 'PROCESS_LINES'
647 self.pager_state = 'PROCESS_LINES'
649 self.pager(self.doc)
648 self.pager(self.doc)
General Comments 0
You need to be logged in to leave comments. Login now