提交 fd085da0 编写于 作者: B Benjamin Pasero

fix NPE for last edit location

上级 8b72d24e
......@@ -210,15 +210,15 @@ export class HistoryService extends Disposable implements IHistoryService {
// Use a debouncer to make sure to capture the correct cursor position
// after the model content has changed.
this.activeEditorListeners.push(debounceEvent(activeTextEditorWidget.onDidChangeModelContent, (last, event) => event, 0)((event => {
const position = activeTextEditorWidget.getPosition();
this.lastEditLocation = { input: activeEditor };
this.lastEditLocation = {
input: activeEditor,
selection: {
const position = activeTextEditorWidget.getPosition();
if (position) {
this.lastEditLocation.selection = {
startLineNumber: position.lineNumber,
startColumn: position.column
}
};
};
}
})));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册