
Note the line with getSelectionEmpty in it is commented out. # move caret to the indentation position:ĮtEmptySelection(curr_pos + offset_from_start_of_line) If editor.getUseTabs(): offset_from_start_of_line /= tab_width Offset_from_start_of_line = new_indent_cols

If curr_pos = editor.positionFromLine(editor.lineFromPosition(curr_pos)): # if caret to the left of any existing text on the line, caret gets moved to column 1 - not desirable If new_indent_cols < 0: new_indent_cols = 0ĮtLineIndentation(editor.lineFromPosition(editor.getCurrentPos()), new_indent_cols) New_indent_cols = (int((curr_indent_cols - 1) / tab_width)) * tab_width New_indent_cols = (int(curr_indent_cols / tab_width) + 1) * tab_width If editor.lineFromPosition(editor.getSelectionStart()) != editor.lineFromPosition(editor.getSelectionEnd()): do_default_behavior = TrueĮditor.tab() if indent_not_dedent else editor.backTab()Ĭurr_indent_cols = editor.getLineIndentation(editor.lineFromPosition(editor.getCurrentPos())) If lectionIsRectangle(): do_default_behavior = True

#if editor.getSelectionEmpty(): do_default_behavior = True

If editor.getSelections() > 1: do_default_behavior = True
