Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /plugins/lineabstraction.py [e14689] .. [b96301] Maximize Restore

  Switch to side-by-side view

--- a/plugins/lineabstraction.py
+++ b/plugins/lineabstraction.py
@@ -202,6 +202,15 @@
             self.stc.SetTargetStart(start)
             self.stc.SetTargetEnd(end)
     
+    def get_indent(self, lineno):
+        '''
+        Allows read-only access to indent level for particular lines.
+        '''
+        line = self[lineno]
+        ci = len(line) - len(line.lstrip())
+        # do we care about the fact that this line is blank?
+        return len(line[:ci].replace('\t', 8))
+    
     def __len__(self):
         return self.stc.GetLineCount()