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

nvim not rendering background colour correctly #13791

Closed
BrandonC98 opened this issue Aug 20, 2022 · 7 comments
Closed

nvim not rendering background colour correctly #13791

BrandonC98 opened this issue Aug 20, 2022 · 7 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@BrandonC98
Copy link

Windows Terminal version

1.14.1962.0

Windows build number

10.0.19044.1889

Other Software

nvim v0.7.2(inside WSL 2 running Ubuntu-20.04)

Steps to reproduce

Open a file with nvim. When adding text to a new line it will cause the rendering of the right side of the terminal to use what appears to be Windows Terminals default background colour. This behaviour is consistent no matter the nvim colour scheme.

Expected Behavior

This is how it looks using WSL terminal

Screenshot 2022-08-20 123815

Actual Behavior

This is how its appearing in Windows Terminal. I've tried playing with a few of the settings but nothing seems to fix this

Screenshot 2022-08-20 123651

@BrandonC98 BrandonC98 added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Aug 20, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 20, 2022
@zadjii-msft
Copy link
Member

Could you share your settings.json file/?

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Aug 22, 2022
@BrandonC98
Copy link
Author

Sure can do!

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": "unbound",
            "keys": ""
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": "toggleAlwaysOnTop",
            "keys": "ctrl+alt+t"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],
    "alwaysOnTop": false,
    "alwaysShowTabs": true,
    "copyFormatting": "none",
    "copyOnSelect": true,
    "defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
    "disableAnimations": false,
    "experimental.rendering.forceFullRepaint": false,
    "launchMode": "default",
    "profiles": 
    {
        "defaults": {},
        "list": 
        [
            {
                "colorScheme": "Laser",
                "cursorShape": "filledBox",
                "experimental.retroTerminalEffect": false,
                "font": 
                {
                    "face": "RobotoMono Nerd Font Mono",
                    "size": 8
                },
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell",
                "useAcrylic": false
            },
            {
                "colorScheme": "Campbell",
                "font": 
                {
                    "face": "RobotoMono NF"
                },
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "colorScheme": "Campbell",
                "cursorShape": "filledBox",
                "experimental.retroTerminalEffect": false,
                "font": 
                {
                    "face": "Cascadia Mono",
                    "size": 10
                },
                "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
                "hidden": false,
                "name": "Ubuntu-18.04",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": "//wsl$/Ubuntu-18.04/home/",
                "useAcrylic": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "commandline": "C:\\Program Files\\Git\\git-cmd.exe",
                "guid": "{d15b228a-05d7-50d1-8472-f60aaba86efc}",
                "icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico",
                "name": "Git Bash"
            },
            {
                "colorScheme": "Campbell",
                "cursorShape": "bar",
                "elevate": true,
                "experimental.retroTerminalEffect": false,
                "font": 
                {
                    "face": "FiraCode NF",
                    "size": 10,
                    "weight": "bold"
                },
                "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
                "hidden": false,
                "historySize": 10951,
                "intenseTextStyle": "bright",
                "name": "Ubuntu-20.04",
                "opacity": 100,
                "source": "Windows.Terminal.Wsl",
                "tabTitle": "Ubuntu-20.04",
                "useAcrylic": false
            },
            {
                "guid": "{a240efc4-c18c-5a3b-88b1-9106f57c499e}",
                "hidden": false,
                "name": "Developer Command Prompt for VS 2019",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{0f5c5553-3a38-5e7a-b045-3eee5d16f1ab}",
                "hidden": false,
                "name": "Developer PowerShell for VS 2019",
                "source": "Windows.Terminal.VisualStudio"
            }
        ]
    },
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#000000",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#FFFFFF",
            "green": "#13A10E",
            "name": "Color Scheme 12",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#1F1D27",
            "black": "#1F1D27",
            "blue": "#FFC284",
            "brightBlack": "#353147",
            "brightBlue": "#FFC284",
            "brightCyan": "#2488FF",
            "brightGreen": "#2DCD73",
            "brightPurple": "#DE8D40",
            "brightRed": "#D9393E",
            "brightWhite": "#EAE5FF",
            "brightYellow": "#D9B76E",
            "cursorColor": "#FF9839",
            "cyan": "#2488FF",
            "foreground": "#B7A1FF",
            "green": "#2DCD73",
            "name": "Duotone Dark",
            "purple": "#DE8D40",
            "red": "#D9393E",
            "selectionBackground": "#353147",
            "white": "#B7A1FF",
            "yellow": "#D9B76E"
        },
        {
            "background": "#010515",
            "black": "#010921",
            "blue": "#10B6FF",
            "brightBlack": "#080117",
            "brightBlue": "#00B3F7",
            "brightCyan": "#00B3F7",
            "brightGreen": "#00B3F7",
            "brightPurple": "#00B3F7",
            "brightRed": "#00B3F7",
            "brightWhite": "#FEFEFE",
            "brightYellow": "#00B3F7",
            "cursorColor": "#10B6FF",
            "cyan": "#10B6FF",
            "foreground": "#11B7FF",
            "green": "#10B6FF",
            "name": "HaX0R_BLUE",
            "purple": "#10B6FF",
            "red": "#10B6FF",
            "selectionBackground": "#C1E4FF",
            "white": "#FAFAFA",
            "yellow": "#10B6FF"
        },
        {
            "background": "#030D18",
            "black": "#626262",
            "blue": "#FED300",
            "brightBlack": "#8F8F8F",
            "brightBlue": "#F92883",
            "brightCyan": "#E6E7FE",
            "brightGreen": "#D6FCBA",
            "brightPurple": "#FFB2FE",
            "brightRed": "#FFC4BE",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFED5",
            "cursorColor": "#00FF9C",
            "cyan": "#D1D1FE",
            "foreground": "#F106E3",
            "green": "#B4FB73",
            "name": "Laser",
            "purple": "#FF90FE",
            "red": "#FF8373",
            "selectionBackground": "#2E206A",
            "white": "#F1F1F1",
            "yellow": "#09B4BD"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#FFFFFF",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#A35FC4",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#0B8F00",
            "green": "#13A10E",
            "name": "Purple",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#1C153D",
            "black": "#101116",
            "blue": "#0271B6",
            "brightBlack": "#686868",
            "brightBlue": "#6871FF",
            "brightCyan": "#60FDFF",
            "brightGreen": "#5FFA68",
            "brightPurple": "#BD35EC",
            "brightRed": "#FF6E67",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFC67",
            "cursorColor": "#76FF9F",
            "cyan": "#00C5C7",
            "foreground": "#E41951",
            "green": "#00DC84",
            "name": "Scarlet Protocol",
            "purple": "#CA30C7",
            "red": "#FF0051",
            "selectionBackground": "#C1DEFF",
            "white": "#C7C7C7",
            "yellow": "#FAF945"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#FFFF00",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        },
        {
            "background": "#000000",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#00FF00",
            "green": "#13A10E",
            "name": "retro",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        }
    ],
    "showTabsInTitlebar": true,
    "startOnUserLogin": false,
    "tabSwitcherMode": "inOrder",
    "theme": "dark",
    "trimBlockSelection": true,
    "useAcrylicInTabRow": false,
    "windowingBehavior": "useAnyExisting"
}

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 22, 2022
@lhecker
Copy link
Member

lhecker commented Aug 23, 2022

Looks like some kind of glyph advance issue in DxEngine?

@BrandonC98 If you get a chance could you install Windows Terminal Preview and enable the experimental text renderer? Here's where you can enable it.

@BrandonC98
Copy link
Author

@lhecker looks to be working fine in Windows Terminal Preview with experimental text renderer enabled.

Screenshot 2022-08-23 203343

@DHowett
Copy link
Member

DHowett commented Aug 24, 2022

I'm glad this is fixed by the atlas renderer! Thanks for testing it out.

The core issue here is that your font has in its various forms (bold and italic) different "advance widths". Over the length of a whole line that results in us losing fractional pixels or fractional cells compared to the ideal width specified by the non-italic and non-bold version, and therefore rendering the background shorter than we're supposed to. The shorter an unbroken run of text, the worse the drift. Every time it's broken up by a change in attribute, we realign it with the right column. You can see that near the line numbers, where black bars showed up when the foreground color changed.

The new engine is very strictly cell-based where the current engine is... uh, let's say "best effort" :)

This is an analogue of #9381, but for the background color.

/dup #9381 with the knowledge that it'll be closed when the Atlas engine becomes the default.

@ghost
Copy link

ghost commented Aug 24, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Aug 24, 2022
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed 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 Needs-Attention The core contributors need to come back around and look at this ASAP. labels Aug 24, 2022
@ghost
Copy link

ghost commented Aug 24, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants