-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
cursor drawn in incorrect location on ChromeOS #77817
Comments
I just had this happen again. It seemed like as I kept typing the cursor was being drawn further and further away from the actual location. Also the error underlines were also drawn before the word that should have been underlined by the same amount as the cursor. |
Version 1.36.1 turned out to be unusable for me because of this. |
@ribrdb can you reproduce this issue when disabling all extensions? |
Same issue here (Version 1.36 as well as 1.36.1, Debian Stretch environment on Google Chrome OS). Also the height of a line seems to be increasing by a tiny bit the moment that line is changed the first time. This issue is rendering VS Code unusable for me, so I ended up rolling back to 1.35.1, where the issue does not exist. |
cc @deepak1556 as it only occurs from 1.36 |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
This issue is not fixed and I gave the requested info immediately when it was requested. |
@ribrdb can you try our exploration builds and check if the issue still persists #75802 (comment) . Thanks! |
@ribrdb Does this reproduce only with certain fonts? What linux distribution are you using? Does this reproduce only on certain (longer) lines? Are you using zooming? ( I need to be able to reproduce on my machine in order to figure out what's wrong, but in the meantime you could use: |
This flag seems to fix the cursor displacement for me, but sometimes the font still gets weird for me (which gets fixed when switching tab back and forth). Could it be 2 separate issues at play? |
@dotMaro Are you certain you have disabled all extensions and have never ever messed with the CSS shipped with VS Code? I'm asking because we would render in exactly the same way an edited line, or a line that is currently being edited, like a line which was never edited... so having decorations rendered correctly after switching tabs and going back is IMHO quite weird.
This is scary, why would the font change? Are you perhaps using IME and doing composition? @ribrdb Thanks for following through and confirming that the monospace optimizations are to be blamed in your case... Unfortunately, I will need to set up Debian Stretch to try and reproduce... Conceptually, here is what we are doing:
It looks that for you, we detect the font as being monospace at startup, but then it actually isn't... Perhaps under your OS the font is lazy loaded or some other bizarre thing where the initial measurements are no longer correct... But I'm speculating, as I didn't really reproduce... |
I have also observed that switching tabs temporarily fixes it, with all extensions disabled. But then it comes back as I start editing the file. |
I'm not sure if it's relevant, but I just wanted to point out that I'm using debian stretch on Chrome OS, which uses Wayland/Sommelier instead of X. Could there be some difference in font metrics because of wayland? |
I'm sure it happens without extensions, I just tried it again. And I have not messed with any CSS. I tried this exploration build but the issue remains.
I'm not using an IME. One weird thing I just noticed was when I did a search all, the font changed for each result/item I hovered over, as if getting corrected. It kinda feels like there are two fonts battling... I would've suspected my PC was messed up somehow if it didn't go away every time I downgrade to 1.35. When I upgraded back to 1.36.1 I noticed the font for the release notes looked off, which I recognized from this issue (the font is correct in 1.35). |
@dotMaro Could you please attempt the following:
I'm trying to understand if this has something to do with our default linux fontFamily, where we use multiple fonts for fallback purposes. |
Well, that made the error manifest itself a bit differently.. with the old font family my cursor always got pushed to the right, now it's in the middle of letters when editor.disableMonospaceOptimizations is off: Like @ribrdb I also have a high DPI display by the way, perhaps that's related? |
I want to point out that I'm not using ChromeOS and I have the issue.. I have noticed some font oddities in Chrome as well though. Could this be some chromium wide thing? Was there a chromium/electron upgrade between 1.35 and 1.36? |
Yes, 1.36 was the first version of VS Code to ship with Electron 4. |
I've personally not seen this issue for quite a while. Maybe it was another electron update that fixed it, but that's just a guess. |
I have a fresh Crostini install on a fresh Powerwash Chrome OS (beta channel) today and I'm seeing this issue (also my laptop is locking up as I'm working in VSCode, maybe related?) |
Same problem with 1.41.1 on Windows. The offset gets worse the further the cursor moves to the right. |
Anyone who has seen this, can you verify that it is fixed in VS Code Insiders? Or @alexdima do you have repro steps? |
I was never able to repro, but since nothing is broken I will optimistically add |
Issue Type: Bug
I can't figure out the exact repro steps, but I've had this happen several times, starting immediately after I updated from the last version of vscode:
The cursor gets drawn one character before the actual location. For example, in a typescript file I click past the end of the line, but the cursor gets drawn before the ; at the end of the line. However if I start typing the new text is added after the semicolon.
Closing the file and re-opening it seems to fix it for a while, but the problem eventually comes back.
This is the first time I've seen this in VS Code, although I've seen a similar issue in Monaco before. When we see it there the cursor is usually offset less than an entire character, so it get's drawn on top of the character preceding the cursor location
VS Code version: Code 1.36.1 (2213894, 2019-07-08T22:55:08.091Z)
OS version: Linux x64 4.19.34-04457-g5b63d4390e96
System Info
flash_3d: unavailable_off
flash_stage3d: unavailable_off
flash_stage3d_baseline: unavailable_off
gpu_compositing: unavailable_off
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: unavailable_off
protected_video_decode: unavailable_off
rasterization: unavailable_off
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled_readback
webgl2: unavailable_off
Extensions (16)
The text was updated successfully, but these errors were encountered: