forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix duplicated lines when scrolling in the pager #3272
Merged
dscho
merged 1 commit into
git-for-windows:main
from
dscho:fix-duplicated-lines-when-moving-in-pager
Jul 5, 2021
Merged
Fix duplicated lines when scrolling in the pager #3272
dscho
merged 1 commit into
git-for-windows:main
from
dscho:fix-duplicated-lines-when-moving-in-pager
Jul 5, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GitGitGadget companion: gitgitgadget#982 |
derrickstolee
approved these changes
Jun 15, 2021
22d3a9a
to
82099e5
Compare
We query `TIOCGWINSZ` in Git to determine the correct value for `COLUMNS`, and then set that environment variable. If `TIOCGWINSZ` is not available, we fall back to the hard-coded value 80 _and still_ set the environment variable. On Windows this is a problem. The reason is that Git for Windows uses a version of `less` that relies on the MSYS2 runtime to interact with the pseudo terminal (typically inside a MinTTY window, which is also aware of the MSYS2 runtime). Both MinTTY and `less.exe` interact with that pseudo terminal via `ioctl()` calls (which the MSYS2 runtime emulates even if there is no such thing on Windows). Since gwsw/less@bb0ee4e76c2, `less` prefers the `COLUMNS` variable over asking ncurses itself. But `git.exe` itself is _not_ aware of the MSYS2 runtime, or for that matter of that pseudo terminal, and has no way to call `ioctl()` or `TIOCGWINSZ`. Therefore, `git.exe` will fall back to hard-coding 80 columns, no matter what the actual terminal size is. But `less.exe` is totally able to interact with the MSYS2 runtime and would not actually require Git's help (which actually makes things worse here). So let's not override `COLUMNS` on Windows. Let's just not set `COLUMNS` unless we managed to query the actual value from the terminal. This fixes git-for-windows#3235 Co-authored-by: Junio C Hamano <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
82099e5
to
fe2ee68
Compare
This topic finally moved into upstream's |
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 5, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 5, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 5, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 5, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 5, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 5, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Jul 5, 2021
…in-pager Fix duplicated lines when scrolling in the pager
1 task
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 6, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 6, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 6, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Jul 10, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Jul 10, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Jul 14, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Jul 14, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 15, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 15, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 15, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 19, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 19, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 19, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 19, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Jul 19, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 21, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 22, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Jul 23, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 24, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 24, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 24, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 26, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 28, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 28, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 29, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 29, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jul 29, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Aug 2, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Aug 2, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Aug 2, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Aug 2, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Aug 2, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Aug 2, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Aug 3, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Aug 11, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Aug 13, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Aug 18, 2021
…in-pager Fix duplicated lines when scrolling in the pager
dscho
added a commit
that referenced
this pull request
Aug 23, 2021
…in-pager Fix duplicated lines when scrolling in the pager
git-for-windows-ci
pushed a commit
that referenced
this pull request
Aug 24, 2021
…in-pager Fix duplicated lines when scrolling in the pager
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This works around #3235 by not setting
COLUMNS
when Git has no clue what the correct value should be.