Skip to content

Commit

Permalink
fix(cursor): ignore cursor position errors in the output (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyaowong committed Oct 24, 2023
1 parent f2f57f8 commit 08ef9d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cursor_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,13 @@ export class CursorManager implements Disposable {
try {
await this.client.request("nvim_win_set_cursor", [winId, vimPos]); // a little faster
} catch (e) {
logger.error(`${(e as Error).message}`);
// 1. The output content may be out of sync due to the rapid changes in content.
// When initializing the buffer, the output may be constantly updating.
// 2. The output is a textEditor, but it cannot accept input, it's meaningless to use the extension.
// In the output, going out-of-sync and cursor position errors are not significant.
if (editor.document.uri.scheme !== "output") {
logger.error(`${(e as Error).message}`);
}
}
}

Expand Down

0 comments on commit 08ef9d3

Please sign in to comment.