File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,8 @@ export function addPlaceholder (
464
464
editor : monaco . editor . ICodeEditor ,
465
465
placeholder : string
466
466
) : monaco . IDisposable {
467
+ const disposableStore = new DisposableStore ( )
468
+
467
469
const widget = new PlaceholderContentWidget ( editor , placeholder )
468
470
469
471
function onDidChangeModelContent ( ) : void {
@@ -475,13 +477,14 @@ export function addPlaceholder (
475
477
}
476
478
477
479
onDidChangeModelContent ( )
478
- const changeDisposable = editor . onDidChangeModelContent ( ( ) => onDidChangeModelContent ( ) )
479
- return {
480
+ disposableStore . add ( editor . onDidChangeModelContent ( onDidChangeModelContent ) )
481
+ disposableStore . add ( editor . onDidChangeModel ( onDidChangeModelContent ) )
482
+ disposableStore . add ( {
480
483
dispose ( ) {
481
- changeDisposable . dispose ( )
482
484
editor . removeContentWidget ( widget )
483
485
}
484
- }
486
+ } )
487
+ return disposableStore
485
488
}
486
489
487
490
export function mapClipboard (
You can’t perform that action at this time.
0 commit comments