Krita Source Code Documentation
Loading...
Searching...
No Matches
krita.sceditor.indenter.NormalIndenter Class Reference
+ Inheritance diagram for krita.sceditor.indenter.NormalIndenter:

Public Member Functions

 __init__ (self, editor)
 
 correct_indentation (self, lineno)
 
- Public Member Functions inherited from krita.sceditor.indenter.TextIndenter
 deindent (self, lineno)
 
 entering_new_line (self, lineno)
 
 indent (self, lineno)
 
 insert_tab (self, index)
 

Additional Inherited Members

- Public Attributes inherited from krita.sceditor.indenter.TextIndenter
 editor
 
 indents
 
 line_editor
 
- Protected Member Functions inherited from krita.sceditor.indenter.TextIndenter
 _count_line_indents (self, lineno)
 
 _set_line_indents (self, lineno, indents)
 

Detailed Description

Definition at line 69 of file indenter.py.

Constructor & Destructor Documentation

◆ __init__()

krita.sceditor.indenter.NormalIndenter.__init__ ( self,
editor )

Reimplemented from krita.sceditor.indenter.TextIndenter.

Definition at line 71 of file indenter.py.

71 def __init__(self, editor):
72 super(NormalIndenter, self).__init__(editor)
73

References krita.sceditor.indenter.NormalIndenter.__init__().

Member Function Documentation

◆ correct_indentation()

krita.sceditor.indenter.NormalIndenter.correct_indentation ( self,
lineno )
Correct the indentation of a line

Reimplemented from krita.sceditor.indenter.TextIndenter.

Definition at line 74 of file indenter.py.

74 def correct_indentation(self, lineno):
75 prev_indents = 0
76 if lineno > 1:
77 prev_indents = self._count_line_indents(lineno - 1)
78 self._set_line_indents(lineno, prev_indents)
79
80

References krita.sceditor.indenter.TextIndenter._count_line_indents(), and krita.sceditor.indenter.TextIndenter._set_line_indents().


The documentation for this class was generated from the following file: