Re: [PATCH] diff.tcl: fixed alignment of tabs in git-gui diff by using spaces
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jan 26, 2026, 14:52 UTC
- Message-ID
- <5ab10a31-8ee5-48f9-a5fd-63c6d7f4adcf@kdbg.org>
- In-Reply-To
- <sYbEiapPid30QZ89paQ6hF_v4BjKnAqUTOt_ImBEfFYBlMVU9uoGwZbKqSkk7aZVxGPrqVXbb58Ogppnw0gQEbH1gwRfBmx3HC2AECWjGkY=@proton.me>
Am 26.01.26 um 15:43 schrieb GitHub Chris Idema:
>> So, you mean that if the tab width is set to 4, then the tab stops >> are not aligned anymore? > > Indeed. It's probably due to the + character shifting everything by 1 character.
BTW, this isn't a problem with a particular tab width. It happens with the default width 8 as well.
Show 6 quoted lines
>> My suspicion is that the patch text does not match the actual file >> contents, and so the commands fail. > > If you select and copy the text from the window with you mouse it > won't match the patch. I didn't know people used it that way. I use > it as a way to review my changes before staging.
I don't mean copy-and-paste. I mean the context menu commands. They stop working (I suspect). This would be a show-stopper.
> I don't know if there is a way to make it that when you copy it will > copy the original text and no the modified text. If not then we > should come up with a better way to align stops.
I am not particularly fond of such a change. Years and years of reading patch text has trained my brain to expect such misalignment to the extent that even the absence of misalignment can sometimes indicate a whitespace error.
-- Hannes