81 |
81 |
82 @param line line to perform the calculation for (integer) |
82 @param line line to perform the calculation for (integer) |
83 @param editor QScintilla editor |
83 @param editor QScintilla editor |
84 @return amount of difference in indentation (integer) |
84 @return amount of difference in indentation (integer) |
85 """ |
85 """ |
86 indent_width = Preferences.getEditor('IndentWidth') |
86 indent_width = editor.getEditorConfig('IndentWidth') |
87 |
87 |
88 lead_spaces = editor.indentation(line) |
88 lead_spaces = editor.indentation(line) |
89 |
89 |
90 pline = line - 1 |
90 pline = line - 1 |
91 while pline >= 0 and re.match('^\s*(#.*)?$', editor.text(pline)): |
91 while pline >= 0 and re.match('^\s*(#.*)?$', editor.text(pline)): |