@electerm/electerm-react 1.34.38 → 1.34.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -770,11 +770,15 @@ export default class Term extends Component {
|
|
|
770
770
|
onData = (d) => {
|
|
771
771
|
if (!d.includes('\r') && !d.includes('\r')) {
|
|
772
772
|
this.dataCache += d
|
|
773
|
+
delete this.userTypeExit
|
|
773
774
|
} else {
|
|
774
775
|
const data = this.dataCache.trim()
|
|
775
776
|
this.dataCache = ''
|
|
776
777
|
if (data === 'exit') {
|
|
777
|
-
this.
|
|
778
|
+
this.userTypeExit = true
|
|
779
|
+
this.timers.userTypeExit = setTimeout(() => {
|
|
780
|
+
delete this.userTypeExit
|
|
781
|
+
}, 2000)
|
|
778
782
|
}
|
|
779
783
|
}
|
|
780
784
|
}
|
|
@@ -1107,6 +1111,9 @@ export default class Term extends Component {
|
|
|
1107
1111
|
if (!this.isActiveTerminal() || !window.focused) {
|
|
1108
1112
|
return false
|
|
1109
1113
|
}
|
|
1114
|
+
if (this.userTypeExit) {
|
|
1115
|
+
return this.props.delSplit(this.state.id)
|
|
1116
|
+
}
|
|
1110
1117
|
const key = `open${Date.now()}`
|
|
1111
1118
|
function closeMsg () {
|
|
1112
1119
|
notification.destroy(key)
|