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
Родитель c166234128
Коммит 0256c89bc6
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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 };

Просмотреть файл

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