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..56bfaa058012e21995256050307dc9275b97c592 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 (range.isEmpty()) |
+ 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"); |
}, |
/** |