fix console crashing on IPython completion (PY-11645)

(cherry picked from commit 4ad7d7b685df02b8f9e4ebfbb631e13bcd4345c8)
This commit is contained in:
Alexander Marchuk
2014-05-07 12:00:10 +02:00
committed by Dmitry Trofimov
parent 0dbd0227b5
commit 2aa7076226
@@ -84,13 +84,15 @@ class PyDevFrontEnd:
self.ipython.history_manager.save_thread.pydev_do_not_trace = True #don't trace ipython history saving thread
def complete(self, string):
if string:
return self.ipython.complete(string)
else:
return self.ipython.complete(string, string, 0)
try:
if string:
return self.ipython.complete(None, line=string, cursor_pos=string.__len__())
else:
return self.ipython.complete(string, string, 0)
except:
# Silence completer exceptions
pass
def is_complete(self, string):
#Based on IPython 0.10.1