Skip to content

Commit

Permalink
fixed indenting error
Browse files Browse the repository at this point in the history
Fixed error where lines would not indent properly with strict indenting
enabled.
  • Loading branch information
pwoosam committed Dec 10, 2016
1 parent 05fee65 commit 95c85f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spyder/widgets/sourcecode/codeeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,14 @@ def fix_indent(self, forward=True, comment_or_string=False):
prevtext = to_text_string(cursor.block().text()).rstrip()

if not prevtext and self.strict_indent_enabled:
return False
cursor = self.textCursor()
cursor.movePosition(QTextCursor.EndOfLine,
QTextCursor.KeepAnchor)
right_of_cursor = cursor.selectedText().rstrip()
if right_of_cursor:
add_indent = False
comment_or_string = True
break

if prevtext:

Expand Down

0 comments on commit 95c85f7

Please sign in to comment.