mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-30 22:21:08 +01: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:
parent
a2df7d791a
commit
5fc2b4cd4a
4 changed files with 30 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue