Skip to content
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

dircolors with background color set highlights to end of line #7360

Closed
zedtools opened this issue Aug 21, 2020 · 4 comments
Closed

dircolors with background color set highlights to end of line #7360

zedtools opened this issue Aug 21, 2020 · 4 comments
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.

Comments

@zedtools
Copy link

Environment

Windows build number: 10.0.19041.450
Windows Terminal version 1.2.2234.0

Any other software? No

Steps to reproduce

I am using zsh on WSL Ubuntu.

Put the following in ~/.dircolors:
OTHER_WRITABLE 30;42

Then run:
eval $( dircolors -b $HOME/.dircolors )

Finally, fill up the terminal screen (e.g. pressing ENTER repeatedly) so that prompt is at the bottom of the window, and run:
ls -l

Expected behavior

When running ls -l to view a writable directory, the directory name should be highlighted.

Actual behavior

If the highlighted directory name spans across a newline, and the ls output scrolls past the bottom of the window, then the entire second line is highlighted.

See screenshot below. The second ls -l caused the terminal to scroll past the bottom of the window, and long_dir_name is incorrectly highlighted.

image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 21, 2020
@zadjii-msft
Copy link
Member

zadjii-msft commented Aug 21, 2020

You know, I thought this was #3848, but this doesn't have anything to do with resizing, so this might not actually be that. And it's not #32 either, because again, there's no resizing happening.

I'm not totally sure what's happening here. I'll toss this on the v2 milestone to figure out. Thanks! (I'm tentatively tossing this on Product-Terminal, but this is probably Product-Conhost)

@zadjii-msft zadjii-msft added Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. labels Aug 21, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 21, 2020
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Aug 21, 2020
@j4james
Copy link
Collaborator

j4james commented Aug 21, 2020

I believe this is working as intended. If the background color is set when the screen scrolls (which is what is happening here), then the newly revealed line is filled with that background color. I think you'll find the same behaviour on all terminals that support background color erase.

@zedtools
Copy link
Author

Hmm... I just tried this with mintty on Windows, and iTerm2 on MacOS. Both of them behave the same as above, so you may be correct.

Resizing the window is different. If i resize iTerm2, the background colour stays unchanged. If I resize Windows Terminal, the background colour is fixed so that it is not highlighted to the end of the line. It's a minor inconsistency, though I am not sure which behaviour is correct.

Based on this, I am happy to leave the current behaviour unchanged.

@zadjii-msft
Copy link
Member

Oh, okay, thanks for the follow up! I guess I triaged this without even checking other terminals 😅

As far as the color highlighting till the end of the line issue, that'll be #32.

Thanks!

@zadjii-msft zadjii-msft removed this from the Terminal v2.0 milestone Aug 24, 2020
@zadjii-msft zadjii-msft added the Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons. label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Projects
None yet
Development

No branches or pull requests

3 participants