Skip to content

Commit cba11e2

Browse files
committed
Enable visibility of selection on find
Fix #5380
1 parent c5a6a44 commit cba11e2

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

app/.classpath

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<classpathentry kind="src" path="test"/>
55
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
66
<classpathentry combineaccessrules="false" kind="src" path="/arduino-core"/>
7-
<classpathentry kind="output" path="bin"/>
87
<classpathentry kind="lib" path="lib/apple.jar"/>
98
<classpathentry kind="lib" path="lib/batik-1.8.jar"/>
109
<classpathentry kind="lib" path="lib/batik-anim-1.8.jar"/>
@@ -41,7 +40,7 @@
4140
<classpathentry kind="lib" path="lib/jmdns-3.4.1.jar"/>
4241
<classpathentry kind="lib" path="lib/jsch-0.1.50.jar"/>
4342
<classpathentry kind="lib" path="lib/jssc-2.8.0.jar"/>
44-
<classpathentry kind="lib" path="lib/rsyntaxtextarea-2.5.8.1+arduino.jar"/>
43+
<classpathentry kind="lib" path="lib/rsyntaxtextarea-2.5.8.1+arduino.jar" sourcepath="/RSyntaxTextArea/src"/>
4544
<classpathentry kind="lib" path="lib/xml-apis-1.3.04.jar"/>
4645
<classpathentry kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
4746
<classpathentry kind="lib" path="lib/xmlgraphics-commons-2.0.jar"/>
@@ -51,4 +50,5 @@
5150
<classpathentry kind="lib" path="test-lib/fest-swing-1.2.jar"/>
5251
<classpathentry kind="lib" path="test-lib/fest-util-1.1.2.jar"/>
5352
<classpathentry kind="lib" path="test-lib/jcip-annotations-1.0.jar"/>
53+
<classpathentry kind="output" path="bin"/>
5454
</classpath>

app/src/cc/arduino/view/findreplace/FindReplace.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import processing.app.Base;
3333
import processing.app.Editor;
34+
import processing.app.EditorTab;
3435
import processing.app.helpers.OSUtils;
3536

3637
import java.awt.*;
@@ -355,8 +356,10 @@ private boolean find(boolean wrap, boolean backwards, boolean searchTabs, int or
355356
}
356357

357358
if (nextIndex != -1) {
358-
editor.getCurrentTab().getTextArea().getFoldManager().ensureOffsetNotInClosedFold(nextIndex);
359-
editor.getCurrentTab().setSelection(nextIndex, nextIndex + search.length());
359+
EditorTab currentTab = editor.getCurrentTab();
360+
currentTab.getTextArea().getFoldManager().ensureOffsetNotInClosedFold(nextIndex);
361+
currentTab.setSelection(nextIndex, nextIndex + search.length());
362+
currentTab.getTextArea().getCaret().setSelectionVisible(true);
360363
return true;
361364
}
362365

app/src/processing/app/EditorTab.java

-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ private SketchTextArea createTextArea(RSyntaxDocument document)
175175

176176
editor.lineStatus.set(lineStart, lineEnd);
177177
});
178-
179178
ToolTipManager.sharedInstance().registerComponent(textArea);
180179

181180
configurePopupMenu(textArea);

0 commit comments

Comments
 (0)