Wrong tab stop positions in the unified diff viewer
What steps will reproduce the problem?
- Make a diff with tabs and spaces (you can use the attached file, but set tab size to 8)
- Open the unified diff viewer ("Show changes as unified diff" from the log messages window)
What is the expected output?
A tab as the first character on a diff line advances as much as 4 spaces (or the current tab size)
What do you see instead? Instead, a tab as the first character of a diff line advances as much as 3 spaces, because the first column in a diff file is used for the '+', '-' or ' ' characters (to indicate the line was added, removed or kept).
What version of TortoiseGit and Git are you using? On what operating system?
TortoiseGit 126.96.36.199 (C:\Program Files\TortoiseGit\bin)
git version 2.32.0.windows.1 (C:\Program Files\Git\bin; C:\Program Files\Git\mingw64; C:\Program Files\Git\etc\gitconfig)
Please provide any additional information below.
Because the diff inserts a new column at character position 0, for the +, - and space characters, the text included in the diff appears shifted to the right by one character.
But not the tab stop positions
So now the tab stops appear shifted to the left, relative to the text being diff'ed.
Because of this, text with tabs appears missaligned
Example file attached: