Skip to content

Commit

Permalink
Fixes code style issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Sep 15, 2017
1 parent 36500a3 commit e54623a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spyder/widgets/sourcecode/codeeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ def add_prefix(self, prefix):
while cursor.position() >= start_pos:
cursor.movePosition(QTextCursor.StartOfBlock)
if (self.get_character(cursor.position()) == ' '
and '#' in prefix):
and '#' in prefix):
cursor.movePosition(QTextCursor.NextWord)
cursor.insertText(prefix)
if start_pos == 0 and cursor.blockNumber() == 0:
Expand Down Expand Up @@ -1602,8 +1602,8 @@ def _remove_prefix(self, prefix, cursor, line_text):
if (prefix.strip() and line_text.lstrip().startswith(prefix + ' ')
or line_text.startswith(prefix + ' ') and '#' in prefix):
cursor.movePosition(QTextCursor.Right,
QTextCursor.MoveAnchor,
line_text.find(prefix + ' '))
QTextCursor.MoveAnchor,
line_text.find(prefix + ' '))
if left_spaces and right_number_spaces == 1:
cursor.movePosition(QTextCursor.Right,
QTextCursor.KeepAnchor, len(prefix + ' '))
Expand All @@ -1612,7 +1612,7 @@ def _remove_prefix(self, prefix, cursor, line_text):
cursor.movePosition(QTextCursor.Right,
QTextCursor.KeepAnchor, len(prefix))
cursor.removeSelectedText()
# Check for prefix without space
# Check for prefix without space
elif (prefix.strip() and line_text.lstrip().startswith(prefix)
or line_text.startswith(prefix)):
cursor.movePosition(QTextCursor.Right,
Expand Down

0 comments on commit e54623a

Please sign in to comment.