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

Unified Diff: third_party/WebKit/Source/devtools/front_end/cm/markselection.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/markselection.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/markselection.js b/third_party/WebKit/Source/devtools/front_end/cm/markselection.js
index 5c42d21eb2d0d00e65d7a1fe139cf767f2ead084..6cceeae6c73db35bbaa1652dd09dc24ecc0997e0 100644
--- a/third_party/WebKit/Source/devtools/front_end/cm/markselection.js
+++ b/third_party/WebKit/Source/devtools/front_end/cm/markselection.js
@@ -34,11 +34,12 @@
});
function onCursorActivity(cm) {
- cm.operation(function() { update(cm); });
+ if (cm.state.markedSelection)
+ cm.operation(function() { update(cm); });
}
function onChange(cm) {
- if (cm.state.markedSelection.length)
+ if (cm.state.markedSelection && cm.state.markedSelection.length)
cm.operation(function() { clear(cm); });
}

Powered by Google App Engine
This is Rietveld 408576698