[GH-ISSUE #124] Diff rendering corrupted with tab indentation #18

Closed
opened 2026-03-03 00:07:10 +03:00 by kerem · 1 comment
Owner

Originally created by @willmcgugan on GitHub (Dec 22, 2025).
Original GitHub issue: https://github.com/batrachianai/toad/issues/124

Discussed in https://github.com/batrachianai/toad/discussions/123

Originally posted by ter0 December 22, 2025
For files with tab indentation, diff rendering on edit seems to get corrupted. I can reproduce it pretty easily just editing a python file with tab indentation. Asking the LLM to swap it back to space indentation seems to fix the diff view rendering. interestingly when I took screenshots with the built in SVG screenshot functionality, they looked correct.

The view when editing a file with tab indentation:
Screenshot_2025-12-22_20-24-35

The view after swapping it back to space based indentation:
Screenshot_2025-12-22_20-26-23

Output of /about-toad:

About Toad v0.5.5

© Will McGugan.

Toad is licensed under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE.

Config

config read from /home/ter0/.config/toad/toad.json

{
    "anon_id": "xxx", 
    "launcher": {
        "agents": "claude.com"
    }, 
    "ui": {
        "theme": "textual-dark", 
        "throbber": "pulse", 
        "column": false
    }, 
    "shell": {
        "linux": {
            "run": "/usr/bin/bash"
        }
    }, 
    "diff": {
        "view": "auto"
    }
}                       

Additional app data stored in /home/ter0/.local/share/toad

System

System Version
Python CPython 3.14.2
OS Linux-6.18.2-arch2-1-x86_64-with-glibc2.42

Dependencies

Library Version
Textual 6.11.0
Rich 14.2.0

Environment

Environment variable Value
TERM xterm-ghostty
COLORTERM truecolor
TERM_PROGRAM ghostty
TERM_PROGRAM_VERSION 1.2.3-arch2
Originally created by @willmcgugan on GitHub (Dec 22, 2025). Original GitHub issue: https://github.com/batrachianai/toad/issues/124 ### Discussed in https://github.com/batrachianai/toad/discussions/123 <div type='discussions-op-text'> <sup>Originally posted by **ter0** December 22, 2025</sup> For files with tab indentation, diff rendering on edit seems to get corrupted. I can reproduce it pretty easily just editing a python file with tab indentation. Asking the LLM to swap it back to space indentation seems to fix the diff view rendering. interestingly when I took screenshots with the built in SVG screenshot functionality, they looked correct. The view when editing a file with tab indentation: <img width="1918" height="964" alt="Screenshot_2025-12-22_20-24-35" src="https://github.com/user-attachments/assets/a60ba806-9872-4354-83a0-066dc8cdfb85" /> The view after swapping it back to space based indentation: <img width="1919" height="959" alt="Screenshot_2025-12-22_20-26-23" src="https://github.com/user-attachments/assets/93b4cedf-fa01-4c84-861c-9623a5a0db34" /> Output of `/about-toad`: # About Toad v0.5.5 © Will McGugan. Toad is licensed under the terms of the [GNU AFFERO GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/agpl-3.0.txt). ## Config config read from `/home/ter0/.config/toad/toad.json` ```json { "anon_id": "xxx", "launcher": { "agents": "claude.com" }, "ui": { "theme": "textual-dark", "throbber": "pulse", "column": false }, "shell": { "linux": { "run": "/usr/bin/bash" } }, "diff": { "view": "auto" } } ``` Additional app data stored in `/home/ter0/.local/share/toad` ## System | System | Version | | --- | --- | | Python | CPython 3.14.2 | | OS | Linux-6.18.2-arch2-1-x86_64-with-glibc2.42 | ## Dependencies | Library | Version | | --- | --- | | Textual | 6.11.0 | | Rich | 14.2.0 | ## Environment | Environment variable | Value | | --- | --- | | `TERM` | xterm-ghostty | | `COLORTERM` | truecolor | | `TERM_PROGRAM` | ghostty | | `TERM_PROGRAM_VERSION` | 1.2.3-arch2 | </div>
kerem 2026-03-03 00:07:10 +03:00
  • closed this issue
  • added the
    diff
    label
Author
Owner

@willmcgugan commented on GitHub (Dec 31, 2025):

Fixed in the latest version

<!-- gh-comment-id:3701997596 --> @willmcgugan commented on GitHub (Dec 31, 2025): Fixed in the latest version
Sign in to join this conversation.
No labels
bug
bug
diff
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/toad#18
No description provided.