File tree Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Original file line number Diff line number Diff line change 4444import processing .app .syntax .ArduinoTokenMakerFactory ;
4545import processing .app .syntax .PdeKeywords ;
4646import processing .app .syntax .SketchTextArea ;
47+ import processing .app .syntax .SketchTextAreaEditorKit ;
4748import processing .app .tools .DiscourseFormat ;
4849import processing .app .tools .MenuScroller ;
4950import processing .app .tools .Tool ;
@@ -1866,28 +1867,8 @@ void handleCommentUncomment() {
18661867
18671868 private void handleIndentOutdent (boolean indent ) {
18681869 if (indent ) {
1869-
1870- int caretPosition = textarea .getCaretPosition ();
1871- boolean noSelec = !textarea .isSelectionActive ();
1872-
1873- // if no selection, focus on first char.
1874- if (noSelec ) {
1875- try {
1876- int line = textarea .getCaretLineNumber ();
1877- int startOffset = textarea .getLineStartOffset (line );
1878- textarea .setCaretPosition (startOffset );
1879- } catch (BadLocationException e ) {
1880- }
1881- }
1882-
1883- // Insert Tab or Spaces..
1884- Action action = textarea .getActionMap ().get (RSyntaxTextAreaEditorKit .insertTabAction );
1870+ Action action = textarea .getActionMap ().get (SketchTextAreaEditorKit .rtaIncreaseIndentAction );
18851871 action .actionPerformed (null );
1886-
1887- if (noSelec ) {
1888- textarea .setCaretPosition (caretPosition );
1889- }
1890-
18911872 } else {
18921873 Action action = textarea .getActionMap ().get (RSyntaxTextAreaEditorKit .rstaDecreaseIndentAction );
18931874 action .actionPerformed (null );
You can’t perform that action at this time.
0 commit comments