Bug 1251823 - fix adding breakpoints through context menu in debugger r=me

This commit is contained in:
James Long
2016-03-03 12:19:09 -05:00
parent 6ed2cef188
commit bc1afe6926
2 changed files with 5 additions and 1 deletions

View File

@@ -1147,7 +1147,7 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
*/
_onCmdAddBreakpoint: function(e) {
let actor = this.selectedValue;
let line = (e && e.sourceEvent.target.tagName == 'menuitem' ?
let line = (this.DebuggerView.clickedLine ?
this.DebuggerView.clickedLine + 1 :
this.DebuggerView.editor.getCursor().line + 1);
let location = { actor, line };

View File

@@ -337,6 +337,10 @@ var DebuggerView = {
}
}
});
this.editor.on("cursorActivity", () => {
this.clickedLine = null;
});
},
updateEditorBreakpoints: function(source) {