commit | 0adc72340d60a05d34e5867434f0c4377f7395f3 | [log] [tgz] |
---|---|---|
author | Marijn Haverbeke <[email protected]> | Wed Dec 08 16:56:57 2021 |
committer | Devtools-frontend LUCI CQ <devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Dec 09 12:12:37 2021 |
tree | c7c5e5f134b4880f281d82fc0b5fd8229e345227 | |
parent | 2bd951fb03c1983a14c7da895424d36c59e26ca3 [diff] [blame] |
Use the backend in isExpressionComplete again [email protected] Bug: 1277979 Change-Id: Ia3b807dfc032a438b22667d5d959d450b4cc6c7b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3323057 Reviewed-by: Tim Van der Lippe <[email protected]> Commit-Queue: Tim Van der Lippe <[email protected]>
diff --git a/front_end/panels/sources/BreakpointEditDialog.ts b/front_end/panels/sources/BreakpointEditDialog.ts index 4153e94..9222e5b 100644 --- a/front_end/panels/sources/BreakpointEditDialog.ts +++ b/front_end/panels/sources/BreakpointEditDialog.ts
@@ -106,11 +106,14 @@ const content = oldCondition || ''; const finishIfComplete = (view: CodeMirror.EditorView): boolean => { - if (TextEditor.JavaScript.isExpressionComplete(view.state)) { - this.finishEditing(true, this.editor.state.doc.toString()); - return true; - } - return false; + TextEditor.JavaScript.isExpressionComplete(view.state.doc.toString()).then((complete): void => { + if (complete) { + this.finishEditing(true, this.editor.state.doc.toString()); + } else { + CodeMirror.insertNewlineAndIndent(view); + } + }); + return true; }; const keymap = [ {