Ghidra is a software reverse engineering (SRE) framework
GP-5416: Fix annoying Terminal scrolling when selecting.
Dan183b862e147b
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalPanel.javaindex 9c591b8c76..e233aa605b 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalPanel.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalPanel.java@@ -39,8 +39,7 @@ import ghidra.app.plugin.core.terminal.TerminalFinder.TextTerminalFinder;import ghidra.app.plugin.core.terminal.vt.*;import ghidra.app.plugin.core.terminal.vt.VtHandler.*;import ghidra.app.services.ClipboardService;-import ghidra.util.ColorUtils;-import ghidra.util.Msg;+import ghidra.util.*;/*** A VT100 terminal emulator in a panel.@@ -466,9 +465,13 @@ public class TerminalPanel extends JPanel implements FieldLocationListener, Fiel* Prevent the user from doing this. Cursor location is controlled by pty. While we've* prevented key strokes from causing this, we've not prevented mouse clicks from doing it.* Next best thing is to just move it back.+ *+ * NOTE: We schedule the cursor re-placement for later, because the FieldPanel may be about+ * to scroll to the cursor. If we re-place immediately, it will likely scroll to the bottom+ * of the terminal. This is especially annoying when the user is trying to make a selection.*/if (trigger == EventTrigger.GUI_ACTION) {- placeCursor(false);+ Swing.runLater(() -> placeCursor(false));}}