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

Unified Diff: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js

Issue 1165263002: DevTools: Add 'continue to here' to the editor context menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/devtools/front_end/source_frame/ResourceSourceFrame.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
index 14433f5b6c4831aa12c920e4aca5ddb6fa7ebf25..a01ac5e079b1be234d130ac3d6b6208a6a4e499a 100644
--- a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
@@ -1061,8 +1061,10 @@ WebInspector.CodeMirrorTextEditor.prototype = {
var target = event.target.enclosingNodeOrSelfWithClass("CodeMirror-gutter-elt");
if (target)
this._delegate.populateLineGutterContextMenu(contextMenu, parseInt(target.textContent, 10) - 1);
- else
- this._delegate.populateTextAreaContextMenu(contextMenu, 0);
+ else {
+ var textSelection = this.selection();
+ this._delegate.populateTextAreaContextMenu(contextMenu, textSelection.startLine, textSelection.startColumn);
+ }
contextMenu.appendApplicableItems(this);
contextMenu.show();
},
@@ -2168,8 +2170,9 @@ WebInspector.TextEditorDelegate.prototype = {
/**
* @param {!WebInspector.ContextMenu} contextMenu
* @param {number} lineNumber
+ * @param {number} columnNumber
*/
- populateTextAreaContextMenu: function(contextMenu, lineNumber) { },
+ populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber) { },
/**
* @param {?WebInspector.TextRange} from
« no previous file with comments | « no previous file | Source/devtools/front_end/source_frame/ResourceSourceFrame.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698