Fixed: drain session scroll counter on attach so viewport-hold never consumes stale background-streamed deltas
Some checks failed
Build / build (apt-android-5) (push) Has been cancelled
Build / build (apt-android-7) (push) Has been cancelled
Automatic Dependency Submission / dependency-submission (push) Has been cancelled
Validate Gradle Wrapper / Validation (push) Has been cancelled
Unit tests / testing (push) Has been cancelled
Attach Debug APKs To Release / attach-apks (apt-android-5) (release) Has been cancelled
Attach Debug APKs To Release / attach-apks (apt-android-7) (release) Has been cancelled
Trigger Termux Library Builds on Jitpack / trigger-termux-library-builds (release) Has been cancelled
Some checks failed
Build / build (apt-android-5) (push) Has been cancelled
Build / build (apt-android-7) (push) Has been cancelled
Automatic Dependency Submission / dependency-submission (push) Has been cancelled
Validate Gradle Wrapper / Validation (push) Has been cancelled
Unit tests / testing (push) Has been cancelled
Attach Debug APKs To Release / attach-apks (apt-android-5) (release) Has been cancelled
Attach Debug APKs To Release / attach-apks (apt-android-7) (release) Has been cancelled
Trigger Termux Library Builds on Jitpack / trigger-termux-library-builds (release) Has been cancelled
The emulator's scroll counter keeps growing while a session is not being viewed (onTextChanged() skips the screen update - and clearScrollCounter() - when the changed session is not current or the activity is not visible). attachSession() reset the view state but left the counter intact: the first screen update after attaching would hand the whole stale delta to the viewport-hold logic, which treats it as "rows appended just now" and pins the view thousands of lines deep into the scrollback, making scrolling appear dead in that session. Discard the counter on attach - the user starts at the live bottom. versionCode 1024 / versionName 0.119.0-titan2.2
This commit is contained in:
@@ -43,8 +43,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion project.properties.minSdkVersion.toInteger()
|
||||
targetSdkVersion project.properties.targetSdkVersion.toInteger()
|
||||
versionCode 1023
|
||||
versionName "0.119.0-titan2.1"
|
||||
versionCode 1024
|
||||
versionName "0.119.0-titan2.2"
|
||||
|
||||
if (appVersionName) versionName = appVersionName
|
||||
validateVersionName(versionName)
|
||||
|
||||
@@ -303,6 +303,17 @@ public final class TerminalView extends View {
|
||||
mHardwareShiftDown = false; // TITAN2 PATCH
|
||||
mHardwareAltDown = false; // TITAN2 PATCH
|
||||
|
||||
// TITAN2 PATCH: discard the session's scroll-delta that accumulated while it was not
|
||||
// being viewed. Output keeps flowing in the background, but onTextChanged() skips the
|
||||
// screen update - and with it clearScrollCounter() - when the session is not current or
|
||||
// the activity is not visible. If that stale counter survived until the first
|
||||
// onScreenUpdated() after this attach, the viewport-hold logic below would treat all of
|
||||
// it as "rows appended just now" and pin the view thousands of lines deep into the
|
||||
// scrollback, stranding the user far from the live output (scrolling appears dead in
|
||||
// this session while other sessions behave normally). Start from the live bottom clean.
|
||||
TerminalEmulator emulator = session.getEmulator();
|
||||
if (emulator != null) emulator.clearScrollCounter();
|
||||
|
||||
mTermSession = session;
|
||||
mEmulator = null;
|
||||
mCombiningAccent = 0;
|
||||
|
||||
Reference in New Issue
Block a user