Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Unified Diff: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js

Issue 2372663004: DevTools: Replace multiline InplaceEditor with CodeMirrorTextEditor (Closed)
Patch Set: resize width Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
index 6cdba4c5769f4ef81bb78283c4513b80ce89d7cd..41d0d9ba36d49fce89744efb2f175f76520b572d 100644
--- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
@@ -52,7 +52,8 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
electricChars: true,
styleActiveLine: true,
indentUnit: 4,
- lineWrapping: options.lineWrapping
+ lineWrapping: options.lineWrapping,
+ lineWiseCopyCut: false
});
this._codeMirrorElement = this.element.lastElementChild;
@@ -132,6 +133,7 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
'Cmd-U': 'undoLastSelection',
fallthrough: 'devtools-common'
};
+
if (options.bracketMatchingSetting)
options.bracketMatchingSetting.addChangeListener(this._enableBracketMatchingIfNeeded, this);
this._enableBracketMatchingIfNeeded();
@@ -942,6 +944,8 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
* @param {number} height
*/
_updatePaddingBottom(width, height) {
+ if (!this._options.padBottom)
+ return;
var scrollInfo = this._codeMirror.getScrollInfo();
var newPaddingBottom;
var linesElement = this._codeMirrorElement.querySelector('.CodeMirror-lines');

Powered by Google App Engine
This is Rietveld 408576698