Fix: Press enter to close failed on exited sessions
This commit is contained in:
parent
74bb1c3fcb
commit
f08fc1e0c9
@ -23,8 +23,6 @@ class TermViewClient(val context: Context) : TerminalViewClient {
|
||||
private var mVirtualFnKeyDown: Boolean = false
|
||||
private var lastTitle: String = ""
|
||||
|
||||
var sessionFinished: Boolean = false
|
||||
|
||||
var termData: TermDataHolder? = null
|
||||
|
||||
override fun onScale(scale: Float): Float {
|
||||
@ -63,7 +61,7 @@ class TermViewClient(val context: Context) : TerminalViewClient {
|
||||
|
||||
when (keyCode) {
|
||||
KeyEvent.KEYCODE_ENTER -> {
|
||||
if (e?.action == KeyEvent.ACTION_DOWN && sessionFinished) {
|
||||
if (e?.action == KeyEvent.ACTION_DOWN && session?.isRunning == false) {
|
||||
termUI?.requireClose()
|
||||
return true
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class TermTab(title: CharSequence) : Tab(title), TermUiPresenter {
|
||||
}
|
||||
|
||||
override fun requireOnSessionFinished() {
|
||||
termData.viewClient?.sessionFinished = true
|
||||
// do nothing
|
||||
}
|
||||
|
||||
override fun requireCreateNew() {
|
||||
|
Loading…
Reference in New Issue
Block a user