mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 02:59:00 +08:00
Merge remote-tracking branch 'origin/GP-5416_Dan_terminalScrollingOnSelect' into patch
This commit is contained in:
+6
-3
@@ -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.*;
|
||||||
import ghidra.app.plugin.core.terminal.vt.VtHandler.*;
|
import ghidra.app.plugin.core.terminal.vt.VtHandler.*;
|
||||||
import ghidra.app.services.ClipboardService;
|
import ghidra.app.services.ClipboardService;
|
||||||
import ghidra.util.ColorUtils;
|
import ghidra.util.*;
|
||||||
import ghidra.util.Msg;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A VT100 terminal emulator in a panel.
|
* 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
|
* 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.
|
* prevented key strokes from causing this, we've not prevented mouse clicks from doing it.
|
||||||
* Next best thing is to just move it back.
|
* 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) {
|
if (trigger == EventTrigger.GUI_ACTION) {
|
||||||
placeCursor(false);
|
Swing.runLater(() -> placeCursor(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user