Skip to content

Commit a877519

Browse files
authored
Type a new line when we receive an insertLineBreak event (microsoft#230469)
also type a new line when we receive an insertlinebreak event
1 parent ce7b68b commit a877519

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class NativeEditContext extends AbstractEditContext {
102102
viewController.emitKeyDown(standardKeyboardEvent);
103103
}));
104104
this._register(addDisposableListener(this.domNode.domNode, 'beforeinput', async (e) => {
105-
if (e.inputType === 'insertParagraph') {
105+
if (e.inputType === 'insertParagraph' || e.inputType === 'insertLineBreak') {
106106
this._onType(viewController, { text: '\n', replacePrevCharCnt: 0, replaceNextCharCnt: 0, positionDelta: 0 });
107107
}
108108
}));

0 commit comments

Comments
 (0)