Skip to content

Painting issue with COMMON_LVB_UNDERSCORE in 1703 onwards #47

Closed

Description

@dra27

COMMON_LVB_UNDERSCORE seems to paint unreliably since Windows 10 1703 (10.0.15063) and it's still present in 10.0.17063.1000 on the fast insider ring.

Compile and run the following program multiple times from a new command prompt (I've only tried it on x64 installations):

#include <windows.h>
#include <stdio.h>

int main(void) {
  HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
  CONSOLE_SCREEN_BUFFER_INFO info;
  GetConsoleScreenBufferInfo(hConsole, &info);
  SetConsoleTextAttribute(hConsole, COMMON_LVB_UNDERSCORE | info.wAttributes);
  printf("COMMON_LVB_UNDERSCORE added to console text attributes\n");
  fflush(stdout);
  printf("Hello world\n");
  fflush(stdout);
  SetConsoleTextAttribute(hConsole, info.wAttributes);
}

The expected output is two lines of text both underlined. On my 1703 box, the first line is never underlined and, randomly, neither was the second on one run. Scroll the console to move the lines off-screen and scroll it back and the lines reappear.

Note that you have to scroll the console text itself out of the viewport and back in - moving another window over the top of the console and then off does not cause the underlining to reappear. The effect occurs regardless of whether the program is run from the machine directly or via remote desktop.

Activity

  1. zadjii-msft commented on Jan 11, 2018

    @zadjii-msft
    Member

    I'm gonna link ConEmu/ConEmu#1302 to this, because they definitely look related. In all likelyhood I probably messed something up with meta attributes when I added RGB color.

    I'm looking into it.

  2. added
    Work-ItemIt's being tracked by an actual work item internally. (to be removed soon)
    Product-ConhostFor issues in the Console codebase
    on Jan 11, 2018
  3. added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    Resolution-Fix-AvailableIt's available in an Insiders build or a release
    and removed
    Work-ItemIt's being tracked by an actual work item internally. (to be removed soon)
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on Feb 12, 2018
  4. added
    Work-ItemIt's being tracked by an actual work item internally. (to be removed soon)
    and removed
    Resolution-Fix-AvailableIt's available in an Insiders build or a release
    on May 3, 2018
  5. bitcrazed commented on May 3, 2018

    @bitcrazed
    Contributor

    Thanks for posting with repro David Allsopp (@dra27) - can confirm this is still an issue post-RS4:

    image

    Also, if I drag the right hand edge, shrinking the Console, I get "underlines galore"!

    image

    Over to you Mike Griese (@zadjii-msft) ;)

    Internal Bug# 17363227

  6. DHowett-MSFT commented on Oct 25, 2018

    @DHowett-MSFT
    Contributor

    This is fixed in the "October 2018 Update".

  7. added this to the RS5 milestone on Oct 25, 2018
  8. scrouthtv commented on Mar 13, 2021

    @scrouthtv

    Dustin L. Howett (MSFT) (@DHowett-MSFT) COMMON_LVB_UNDERSCORE is not working for me. Should I open a new issue?

    I am running 1.7.572.0

  9. zadjii-msft commented on Mar 15, 2021

    @zadjii-msft
    Member

    scrouthtv Probably - this bug is just about 3 years old (and entirely predates the Terminal's entire codebase), so if you're seeing something like this, it's probably a different root cause.

  10. DHowett commented on Mar 15, 2021

    @DHowett
    Member

    I believe we decoupled COMMON_LVB_UNDERSCORE from SGR 4 underline, and now Terminal therefore ignores COMMON_LVB_UNDERSCORE.

  11. scrouthtv commented on Mar 15, 2021

    @scrouthtv

    I just found there's already an opened issue about this: #8037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Product-ConhostFor issues in the Console codebaseResolution-Fix-AvailableIt's available in an Insiders build or a release

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions