File tree 1 file changed +2
-21
lines changed
1 file changed +2
-21
lines changed Original file line number Diff line number Diff line change 44
44
import processing .app .syntax .ArduinoTokenMakerFactory ;
45
45
import processing .app .syntax .PdeKeywords ;
46
46
import processing .app .syntax .SketchTextArea ;
47
+ import processing .app .syntax .SketchTextAreaEditorKit ;
47
48
import processing .app .tools .DiscourseFormat ;
48
49
import processing .app .tools .MenuScroller ;
49
50
import processing .app .tools .Tool ;
@@ -1866,28 +1867,8 @@ void handleCommentUncomment() {
1866
1867
1867
1868
private void handleIndentOutdent (boolean indent ) {
1868
1869
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 );
1885
1871
action .actionPerformed (null );
1886
-
1887
- if (noSelec ) {
1888
- textarea .setCaretPosition (caretPosition );
1889
- }
1890
-
1891
1872
} else {
1892
1873
Action action = textarea .getActionMap ().get (RSyntaxTextAreaEditorKit .rstaDecreaseIndentAction );
1893
1874
action .actionPerformed (null );
You can’t perform that action at this time.
0 commit comments