mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-14 13:01:17 +01:00
Create new terminal sessions with directory of active session
This mimics the behaviour of most tabbed terminal emulators. Fixes #1009.
This commit is contained in:
parent
7f7c1efac1
commit
e28be01dc2
2 changed files with 25 additions and 1 deletions
|
|
@ -603,7 +603,9 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
|||
new AlertDialog.Builder(this).setTitle(R.string.max_terminals_reached_title).setMessage(R.string.max_terminals_reached_message)
|
||||
.setPositiveButton(android.R.string.ok, null).show();
|
||||
} else {
|
||||
TerminalSession newSession = mTermService.createTermSession(null, null, null, failSafe);
|
||||
TerminalSession currentSession = getCurrentTermSession();
|
||||
String workingDirectory = (currentSession == null) ? null : currentSession.getCwd();
|
||||
TerminalSession newSession = mTermService.createTermSession(null, null, workingDirectory, failSafe);
|
||||
if (sessionName != null) {
|
||||
newSession.mSessionName = sessionName;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue