fix: alt buffer issue when entering vi (#210)

Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
Chapman Pendery
2024-03-18 09:13:07 -07:00
committed by GitHub
parent 10c1a85e69
commit 2c0d4df2e1
+3 -1
View File
@@ -227,9 +227,11 @@ export class CommandManager {
this.#activeCommand.promptEndMarker = this.#terminal.registerMarker(0);
}
if (this.#activeCommand.promptEndMarker == null) return;
// if we haven't fond the prompt yet, poll over the next 5 lines searching for it
if (this.#activeCommand.promptText == null && withinPollDistance) {
for (let i = globalCursorPosition; i < this.#activeCommand.promptEndMarker!.line + maxPromptPollDistance; i++) {
for (let i = globalCursorPosition; i < this.#activeCommand.promptEndMarker.line + maxPromptPollDistance; i++) {
if (this.#previousCommandLines.has(i)) continue;
const promptResult = this._getWindowsPrompt(i);
if (promptResult != null) {