-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Integrated terminal: Selection not on the same position as displayed text when text is bold (causing copying more/different text than what appears selected) #29402
Comments
@CherryDT what font is that and what OS/version are you on? |
@Tyriar Windows 10 Build 15063, and this is Ubuntu Mono - sorry, I forgot that the font was non-standard. In this case it's also bold (this is actually another bug I yet have to open - it exists for a long time, that after certain - usually colored - output, everything else becomes bold; for example using Git bash and then starting node REPL and then entering something (e.g. |
@CherryDT I can't seem to repro. Some follow ups:
|
I realized now that the issue is actually in the rendering of the bold font. As you can see here, as soon as the font is bold (the reason for which is another bug, #29439), it doesn't fit into the grid correctly anymore. And then the selection uses a different grid than the text you are trying to select (and you end up copying more than you intend to). My settings.json file is:
It happens in all lines as long as the font is bold. It also happens after restarting. It doesn't fix itself on resizing. |
@CherryDT bold rendering is meant to be disabled if the widths are different https://github.com/sourcelair/xterm.js/blob/f95bc64971c577bba2cf375c2333e570ac6ef5d5/src/Renderer.ts#L211 We test "hello world" to check the width, maybe those characters are find but the numbers/punctuation chars differ in width? |
@CherryDT can you inspect the row via devtools (Help > Toggle Developer Tools) and verify that the |
@CherryDT created xtermjs/xterm.js#730 to follow this up. As a workaround you should just use a different font that is the same width. When xtermjs/xterm.js#730 is handled you just won't be getting any bold at all. |
@CherryDT you can also disable bold completely using |
This should have been fixed with the terminal rendering improvements in v1.17. Assigning to October for verification. |
Version 1.14.0-insider
Commit 779a7df
Date 2017-06-23T05:59:57.891Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0
EDIT: It is worse than that, because I now realized that what has been copied is this:
Note the two extra characters at the end which I didn't intend to copy.
The text was updated successfully, but these errors were encountered: