diff --git a/Prefixr.py b/Prefixr.py index 633b9b7..3fccaa8 100644 --- a/Prefixr.py +++ b/Prefixr.py @@ -116,7 +116,7 @@ def fix_whitespace(self, original, prefixed, sel, braces): # Determine the indent of the CSS rule (row, col) = self.view.rowcol(sel.begin()) 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) else: indent = ''