##// END OF EJS Templates
More calltip fixing.
Gael Varoquaux -
Show More
@@ -75,10 +75,9 b' class IPythonWxController(PrefilterFrontEnd, ConsoleWidget):'
75
75
76
76
77 def do_calltip(self):
77 def do_calltip(self):
78 separators = [' ', '(', '[', '{', '\n', '\t']
78 separators = re.compile('[\s\{\}\[\]\(\)\= ,:]')
79 symbol = self.get_current_edit_buffer()
79 symbol = self.get_current_edit_buffer()
80 for separator in separators:
80 symbol_string = separators.split(symbol)[-1]
81 symbol_string = symbol.split(separator)[-1]
82 base_symbol_string = symbol_string.split('.')[0]
81 base_symbol_string = symbol_string.split('.')[0]
83 if base_symbol_string in self.shell.user_ns:
82 if base_symbol_string in self.shell.user_ns:
84 symbol = self.shell.user_ns[base_symbol_string]
83 symbol = self.shell.user_ns[base_symbol_string]
@@ -94,7 +93,7 b' class IPythonWxController(PrefilterFrontEnd, ConsoleWidget):'
94 self.AutoCompCancel()
93 self.AutoCompCancel()
95 wx.Yield()
94 wx.Yield()
96 self.CallTipShow(self.GetCurrentPos(), symbol)
95 self.CallTipShow(self.GetCurrentPos(), symbol)
97 except TypeError:
96 except:
98 # The retrieve symbol couldn't be converted to a string
97 # The retrieve symbol couldn't be converted to a string
99 pass
98 pass
100
99
@@ -109,7 +108,7 b' class IPythonWxController(PrefilterFrontEnd, ConsoleWidget):'
109 suggestion, completions = self.complete(line)
108 suggestion, completions = self.complete(line)
110 offset=0
109 offset=0
111 if completions:
110 if completions:
112 complete_sep = re.compile('[\s\{\}\[\]\(\)\= ]')
111 complete_sep = re.compile('[\s\{\}\[\]\(\)\= ,:]')
113 residual = complete_sep.split(line)[-1]
112 residual = complete_sep.split(line)[-1]
114 offset = len(residual)
113 offset = len(residual)
115 self.pop_completion(completions, offset=offset)
114 self.pop_completion(completions, offset=offset)
General Comments 0
You need to be logged in to leave comments. Login now