mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Fix issue where cursor blinker wouldn't automatically start after session change
The reason was that mTerminalCursorBlinkerRunnable inner class mEmulator wouldn't get updated to the new mEmulator on session change and would still be using the old session's.
This commit is contained in:
parent
59877a08d1
commit
d3c34ad1f5
1 changed files with 9 additions and 1 deletions
|
|
@ -760,6 +760,10 @@ public final class TerminalView extends View {
|
|||
mEmulator = mTermSession.getEmulator();
|
||||
mClient.onEmulatorSet();
|
||||
|
||||
// Update mTerminalCursorBlinkerRunnable inner class mEmulator on session change
|
||||
if (mTerminalCursorBlinkerRunnable != null)
|
||||
mTerminalCursorBlinkerRunnable.setEmulator(mEmulator);
|
||||
|
||||
mTopRow = 0;
|
||||
scrollTo(0, 0);
|
||||
invalidate();
|
||||
|
|
@ -966,7 +970,7 @@ public final class TerminalView extends View {
|
|||
|
||||
private class TerminalCursorBlinkerRunnable implements Runnable {
|
||||
|
||||
private final TerminalEmulator mEmulator;
|
||||
private TerminalEmulator mEmulator;
|
||||
private final int mBlinkRate;
|
||||
|
||||
// Initialize with false so that initial blink state is visible after toggling
|
||||
|
|
@ -977,6 +981,10 @@ public final class TerminalView extends View {
|
|||
mBlinkRate = blinkRate;
|
||||
}
|
||||
|
||||
public void setEmulator(TerminalEmulator emulator) {
|
||||
mEmulator = emulator;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
if (mEmulator != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue