Commit df04676 Carlos Cabanero
committed
1 parent bcd05df commit df04676 Copy full SHA for df04676
File tree 2 files changed +10
-7
lines changed
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -496,6 +496,10 @@ extension TermController: SuspendableSession {
496
496
if view. bounds. size != _sessionParams. viewSize {
497
497
_session? . sigwinch ( )
498
498
}
499
+
500
+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 2 ) {
501
+ self . _termView. setClipboardWrite ( true )
502
+ }
499
503
}
500
504
501
505
@@ -518,7 +522,9 @@ extension TermController: SuspendableSession {
518
522
_session? . sigwinch ( )
519
523
}
520
524
521
- _termView. setClipboardWrite ( true )
525
+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 2 ) {
526
+ self . _termView. setClipboardWrite ( true )
527
+ }
522
528
}
523
529
524
530
func suspendedSession( with archiver: NSKeyedArchiver ) {
Original file line number Diff line number Diff line change @@ -113,8 +113,9 @@ function term_setup(accessibilityEnabled) {
113
113
t . onTerminalReady = function ( ) {
114
114
window . installKB ( t , t . scrollPort_ . screen_ ) ;
115
115
term_setAutoCarriageReturn ( true ) ;
116
+ term_setClipboardWrite ( false ) ;
117
+
116
118
t . setCursorVisible ( true ) ;
117
-
118
119
t . io . onTerminalResize = function ( cols , rows ) {
119
120
_postMessage ( 'sigwinch' , { cols, rows} ) ;
120
121
if ( t . prompt ) {
@@ -342,11 +343,7 @@ function term_setClipboardWrite(state) {
342
343
if ( state === false ) {
343
344
t . vt . enableClipboardWrite = false ;
344
345
} else {
345
- setTimeout ( ( ) => {
346
- // Delay a tiny bit so operations that reset the clipboard
347
- // can have a tiny bit more margin. #1205
348
- t . vt . enableClipboardWrite = true ;
349
- } , 500 ) ;
346
+ t . vt . enableClipboardWrite = true ;
350
347
}
351
348
}
352
349
You can’t perform that action at this time.
0 commit comments