##// END OF EJS Templates
Better tab-completion when the autocomp menu is displayed.
Gael Varoquaux -
Show More
@@ -242,7 +242,6 b' class ConsoleWidget(editwindow.EditWindow):'
242 self.CmdKeyClear(ord('L'), stc.STC_SCMOD_CTRL)
242 self.CmdKeyClear(ord('L'), stc.STC_SCMOD_CTRL)
243 self.CmdKeyClear(ord('T'), stc.STC_SCMOD_CTRL)
243 self.CmdKeyClear(ord('T'), stc.STC_SCMOD_CTRL)
244
244
245
246 self.SetEOLMode(stc.STC_EOL_CRLF)
245 self.SetEOLMode(stc.STC_EOL_CRLF)
247 self.SetWrapMode(stc.STC_WRAP_CHAR)
246 self.SetWrapMode(stc.STC_WRAP_CHAR)
248 self.SetWrapMode(stc.STC_WRAP_WORD)
247 self.SetWrapMode(stc.STC_WRAP_WORD)
@@ -260,6 +259,8 b' class ConsoleWidget(editwindow.EditWindow):'
260 # automaticaly
259 # automaticaly
261 self.AutoCompSetChooseSingle(False)
260 self.AutoCompSetChooseSingle(False)
262 self.AutoCompSetMaxHeight(10)
261 self.AutoCompSetMaxHeight(10)
262 # XXX: this doesn't seem to have an effect.
263 self.AutoCompSetFillUps('\n')
263
264
264 self.SetMargins(3, 3) #text is moved away from border with 3px
265 self.SetMargins(3, 3) #text is moved away from border with 3px
265 # Suppressing Scintilla margins
266 # Suppressing Scintilla margins
@@ -377,12 +377,12 b' class WxController(ConsoleWidget, PrefilterFrontEnd):'
377 # Calltips
377 # Calltips
378 event.Skip()
378 event.Skip()
379 self.do_calltip()
379 self.do_calltip()
380 elif self.AutoCompActive():
380 elif self.AutoCompActive() and not event.KeyCode == ord('\t'):
381 event.Skip()
381 event.Skip()
382 if event.KeyCode in (wx.WXK_BACK, wx.WXK_DELETE):
382 if event.KeyCode in (wx.WXK_BACK, wx.WXK_DELETE):
383 wx.CallAfter(self._popup_completion, create=True)
383 wx.CallAfter(self._popup_completion, create=True)
384 elif not event.KeyCode in (wx.WXK_UP, wx.WXK_DOWN, wx.WXK_LEFT,
384 elif not event.KeyCode in (wx.WXK_UP, wx.WXK_DOWN, wx.WXK_LEFT,
385 wx.WXK_RIGHT):
385 wx.WXK_RIGHT, wx.WXK_ESCAPE):
386 wx.CallAfter(self._popup_completion)
386 wx.CallAfter(self._popup_completion)
387 else:
387 else:
388 # Up history
388 # Up history
@@ -410,6 +410,8 b' class WxController(ConsoleWidget, PrefilterFrontEnd):'
410 last_line = self.input_buffer.split('\n')[-1]
410 last_line = self.input_buffer.split('\n')[-1]
411 if not re.match(r'^\s*$', last_line):
411 if not re.match(r'^\s*$', last_line):
412 self.complete_current_input()
412 self.complete_current_input()
413 if self.AutoCompActive():
414 wx.CallAfter(self._popup_completion, create=True)
413 else:
415 else:
414 event.Skip()
416 event.Skip()
415 else:
417 else:
General Comments 0
You need to be logged in to leave comments. Login now