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

Unified Diff: third_party/WebKit/Source/devtools/front_end/cm/overlay.js

Issue 2772343006: DevTools: Roll CodeMirror to 5.25.1 (Closed)
Patch Set: stray space Created 3 years, 9 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/cm/overlay.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/overlay.js b/third_party/WebKit/Source/devtools/front_end/cm/overlay.js
index e1b9ed37530ad824e23d50a0c4c91057c8e9fb41..4a9f99a072ecb6b4c9a65f7a5cb170cb906367b5 100644
--- a/third_party/WebKit/Source/devtools/front_end/cm/overlay.js
+++ b/third_party/WebKit/Source/devtools/front_end/cm/overlay.js
@@ -76,8 +76,13 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
innerMode: function(state) { return {state: state.base, mode: base}; },
blankLine: function(state) {
- if (base.blankLine) base.blankLine(state.base);
- if (overlay.blankLine) overlay.blankLine(state.overlay);
+ var baseToken, overlayToken;
+ if (base.blankLine) baseToken = base.blankLine(state.base);
+ if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);
+
+ return overlayToken == null ?
+ baseToken :
+ (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);
}
};
};

Powered by Google App Engine
This is Rietveld 408576698