mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Added: Add SCROLL
extra key to toggle auto scrolling of terminal to bottom on terminal text updates and termux activity return
The toggle will apply to each terminal session separately. Closes #2535
This commit is contained in:
@@ -252,6 +252,9 @@ public final class TerminalEmulator {
|
||||
*/
|
||||
private int mScrollCounter = 0;
|
||||
|
||||
/** If automatic scrolling of terminal is disabled */
|
||||
private boolean mAutoScrollDisabled;
|
||||
|
||||
private byte mUtf8ToFollow, mUtf8Index;
|
||||
private final byte[] mUtf8InputBuffer = new byte[4];
|
||||
private int mLastEmittedCodePoint = -1;
|
||||
@@ -2412,6 +2415,15 @@ public final class TerminalEmulator {
|
||||
mScrollCounter = 0;
|
||||
}
|
||||
|
||||
public boolean isAutoScrollDisabled() {
|
||||
return mAutoScrollDisabled;
|
||||
}
|
||||
|
||||
public void toggleAutoScrollDisabled() {
|
||||
mAutoScrollDisabled = !mAutoScrollDisabled;
|
||||
}
|
||||
|
||||
|
||||
/** Reset terminal state so user can interact with it regardless of present state. */
|
||||
public void reset() {
|
||||
setCursorStyle();
|
||||
|
Reference in New Issue
Block a user