Index: third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
index fe51527baac65db0f83ccae14ad9a0e96810ed68..e2a23302834c95f5fd46663fe05ac92760cde1b3 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
@@ -1025,8 +1025,12 @@ WebInspector.CodeMirrorTextEditor.prototype = { |
bookmarks: function(range) |
{ |
var pos = WebInspector.CodeMirrorUtils.toPos(range); |
- var markers = this._codeMirror.findMarks(pos.start, pos.end); |
- return markers.filter(marker => marker.type === "bookmark"); |
+ if (pos.start.line === pos.end.line && pos.start.ch === pos.end.ch) |
lushnikov
2016/07/29 17:46:24
if (range.isEmpty())
flandy
2016/07/29 18:31:39
Done.
|
+ return this._codeMirror.findMarksAt(pos.start).filter(marker => marker.type === "bookmark"); |
+ var startMarkers = this._codeMirror.findMarksAt(pos.start); |
+ var middleMarkers = this._codeMirror.findMarks(pos.start, pos.end); |
+ var endMarkers = this._codeMirror.findMarksAt(pos.end); |
+ return startMarkers.concat(middleMarkers, endMarkers).filter(marker => marker.type === "bookmark"); |
}, |
/** |