Skip to content

Commit

Permalink
Fixed a bug with detecting indentation when there is none
Browse files Browse the repository at this point in the history
  • Loading branch information
wbond committed Nov 14, 2011
1 parent 23ea868 commit 4f654a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Prefixr.py
Expand Up @@ -116,7 +116,7 @@ def fix_whitespace(self, original, prefixed, sel, braces):
# Determine the indent of the CSS rule # Determine the indent of the CSS rule
(row, col) = self.view.rowcol(sel.begin()) (row, col) = self.view.rowcol(sel.begin())
indent_region = self.view.find('^\s+', self.view.text_point(row, 0)) indent_region = self.view.find('^\s+', self.view.text_point(row, 0))
if self.view.rowcol(indent_region.begin())[0] == row: if indent_region and self.view.rowcol(indent_region.begin())[0] == row:
indent = self.view.substr(indent_region) indent = self.view.substr(indent_region)
else: else:
indent = '' indent = ''
Expand Down

1 comment on commit 4f654a1

@userhgq
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

Please sign in to comment.