You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens under Spyder 3.0.0-dev (from winpython) as well as Spyder 2.3.5.2 (from Arch Repos).
Under windows it simply crashes the application, under Linux I get a nice traceback:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/spyderlib/widgets/sourcecode/codeeditor.py", line 2466, in keyPressEvent
self.intelligent_tab()
File "/usr/lib/python3.4/site-packages/spyderlib/widgets/sourcecode/codeeditor.py", line 758, in intelligent_tab
self.indent_or_replace()
File "/usr/lib/python3.4/site-packages/spyderlib/widgets/sourcecode/codeeditor.py", line 1930, in indent_or_replace
self.indent()
File "/usr/lib/python3.4/site-packages/spyderlib/widgets/sourcecode/codeeditor.py", line 1916, in indent
if not self.fix_indent(forward=True):
File "/usr/lib/python3.4/site-packages/spyderlib/widgets/sourcecode/codeeditor.py", line 1822, in fix_indent
correct_indent = self.get_block_indentation(prevline)
UnboundLocalError: local variable 'prevline' referenced before assignment
The problem is clear: there is no previous line
The text was updated successfully, but these errors were encountered:
I am trying to fix this, but I am unsure whether to do this in intelligent_tab (checking for cursor position) or in fix_indent (making sure that no codepath ever hits this problem again). It should probably be the latter.
Beta-Alf
pushed a commit
to Beta-Alf/spyder
that referenced
this issue
Aug 13, 2015
This happens under Spyder 3.0.0-dev (from winpython) as well as Spyder 2.3.5.2 (from Arch Repos).
Under windows it simply crashes the application, under Linux I get a nice traceback:
The problem is clear: there is no previous line
The text was updated successfully, but these errors were encountered: