mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-5416: Fix annoying Terminal scrolling when selecting.
This commit is contained in:
parent
7e3468a17e
commit
183b862e14
1 changed files with 6 additions and 3 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue