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