diff options
| author | sigoden <sigoden@gmail.com> | 2024-03-28 22:11:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-28 22:11:56 +0800 |
| commit | 2206593612619d1fe5a7de48512e9601fc466108 (patch) | |
| tree | b5d6421fb9cf4c031d10b51cd4b251df6bfe42a3 /src/render/stream.rs | |
| parent | 68a1d98a3dd583c506447e8035f07ea05408f4dd (diff) | |
| download | aichat-2206593612619d1fe5a7de48512e9601fc466108.tar.gz | |
fix: incorrectly render text contains tabs (#384)
Diffstat (limited to 'src/render/stream.rs')
| -rw-r--r-- | src/render/stream.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/render/stream.rs b/src/render/stream.rs index 2c05119..ee38759 100644 --- a/src/render/stream.rs +++ b/src/render/stream.rs @@ -77,7 +77,10 @@ fn markdown_stream_inner( spinner.stop(writer)?; match reply_event { - ReplyEvent::Text(text) => { + ReplyEvent::Text(mut text) => { + // tab width hacking + text = text.replace('\t', " "); + let (col, mut row) = cursor::position()?; // Fix unexpected duplicate lines on kitty, see https://github.com/sigoden/aichat/issues/105 |
