small patches to streaming

This commit is contained in:
Nate Sesti 2023-06-29 21:35:36 -07:00
parent ba080ba48b
commit 033d94fd4c
2 changed files with 6 additions and 1 deletions

View file

@ -107,7 +107,7 @@ class Range(BaseModel):
lines = content.splitlines()
if len(lines) == 0:
return Range.from_shorthand(0, 0, 0, 0)
return Range.from_shorthand(0, 0, len(lines) - 1, len(lines[-1]) - 1)
return Range.from_shorthand(0, 0, len(lines), 0)
@staticmethod
def from_snippet_in_file(content: str, snippet: str) -> "Range":

View file

@ -173,6 +173,11 @@ class IdeProtocolClient {
}
);
setTimeout(() => {
cursorDisposable.dispose();
editor.setDecorations(decorationType, []);
}, 2500);
if (this._lastDecorationType) {
editor.setDecorations(this._lastDecorationType, []);
}