You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code contains the reason to Go to Next difference (F7) bug and have corresponding comments
The following code is in min/VS/Editor/editor.main.js
class N extends c.EditorAction {
constructor() {
super({
id: "editor.action.diffReview.next",
label: i.localize(10, null),
alias: "Go to Next Difference",
precondition: v.ContextKeyExpr.has("isInDiffEditor"),
kbOpts: {kbExpr: null, primary: 65, weight: 100}
})
}
run(e, t) {
const i = M(e);//Because M(e) return null, i = null
i && i.diffReviewNext()//Because i = null, i.diffreviewnext() will not be executed
}
}
function M(e) {
const t = e.get(h.ICodeEditorService), i = t.listDiffEditors(), n = t.getActiveCodeEditor();//n=null
if (!n) return null;//In JavaScript ! Null is true, so M(e) also return null
for (let e = 0, t = i.length; e < t; e++) {
const t = i[e]
;
if (t.getModifiedEditor().getId() === n.getId() || t.getOriginalEditor().getId() === n.getId()) return t
}
return null
}
class s extends o.CodeEditorServiceImpl {
getActiveCodeEditor() {
return null
}
...
}
Activity
1819981451 commentedon Jul 12, 2021
The following code contains the reason to Go to Next difference (F7) bug and have corresponding comments
The following code is in min/VS/Editor/editor.main.js
juaniscoding commentedon Dec 1, 2023
help you with what??
SiweiZhong commentedon Dec 1, 2023
huangfuyixiao commentedon Dec 1, 2023