-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diff not using the full width of Git Bash #39
Comments
Interesting, I use this library to figure out the terminal size in a cross platform manner: https://github.com/sindresorhus/term-size/blob/main/index.js. From reading the implementation, I'm guessing it's seeing a different value for If you're comfortable with debugging this on your end, find your global A less ideal workaround that might work is setting the |
I did a little digging, and it seems like the library has a fallback (whatever this term-size.exe is doing) for windows if |
Perfect, thanks! |
Hey there, the owner of terminal-size seems to have added support for xTerm / mintty. Would be great if you could update the package :) |
Hey thanks for chasing that down. The developer of terminal-size also forced everyone to use ESMs in a prior release (https://github.com/sindresorhus/terminal-size/releases/tag/v3.0.0), which is quite a bit of pain to migrate to, tbh. I managed to get the build working locally in https://github.com/banga/git-split-diffs/compare/esm-migration, but tests and benchmarks don't work yet, so I don't want to publish this yet. I'll come back to it. Meanwhile, if you feel comfortable, you can try checking out this branch and building it locally (via |
This converts the package to generate an ESM module as the build output. The instigator was #39 but there were a number of ESM-only packages in the dependencies. The final result is as follows: * Switched from `term-size` to `terminal-size` and upgraded `ansi-regex`, `chalk` and `diff`. * Switched to [shikiji](https://github.com/antfu/shikiji) and patched the perf optimization for `setTheme` from shiki. * Update min node version to 18. * There's a ~35ms improvement in startup time. * Switched from `yarn` to `npm`. `yarn v4` does pretty weird things that were hard to get to work esp on windows.
Ok I finally migrated over to ESM, which lets me use the latest |
Ok, this is an interesting one. Foremost, thanks a lot for upgrading and maintaining this. Unfortunately, it's not really doing it in v1.0.1 However, when I do my git diff, it still looks like my initial screenshot - but only for git bash. Cmd is fine. After also debugging your code, I have a creeping suspicion. Git Bash opens the diff in the same window but in the Just for completion, my settings:
|
Oh interesting. I read the new issue you filed and though I don't understand why the fix works, it looks like we roughly know where the fix lies, so hopefully this should get addressed soon. I'll pull in the update when that happens. |
Hey there,
thanks for creating that amazing tool.
However, I'm using the standard Git Bash that comes with the windows git installation and the diffs are not using the full window's width.
I'm starting the bash by default with a column count of 280 and did not resize it. I'll get a split diff up until a
split-diffs.min-line-width
of 60 - after that it's only inline.At first, I suspected it's because of my monitor's 150% scaling, but reverting that to 100% did not change anything. And in general it works: doing a git diff in window's cmd works perfectly and uses the console's full width.
And ideas why it's not working with the Git Bash?
The text was updated successfully, but these errors were encountered: