diff --git a/app/build.gradle b/app/build.gradle index 5cc9a8bb..7aed1e24 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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) diff --git a/terminal-view/src/main/java/com/termux/view/TerminalView.java b/terminal-view/src/main/java/com/termux/view/TerminalView.java index 34f05b10..e18e51b3 100644 --- a/terminal-view/src/main/java/com/termux/view/TerminalView.java +++ b/terminal-view/src/main/java/com/termux/view/TerminalView.java @@ -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;