nvda icon indicating copy to clipboard operation
nvda copied to clipboard

VS Code: When a line has more than 10,000 characters, the contents of subsequent lines are not reported correctly when navigating up and down arrows on subsequent lines

Open hwf1324 opened this issue 1 year ago • 10 comments

Steps to reproduce:

  1. Open VS Code, create a new file and set the language to HTML
  2. Enter the following line: "lorem" (press tab to complete) "lorem1400" (press tab to complete) "lorem" (press tab to complete)
  3. Navigate between lines by pressing the up and down arrows

Actual behavior:

When a line has more than 10,000 characters, the contents of subsequent lines are not reported correctly when navigating up and down arrows on subsequent lines

Expected behavior:

When browsing with the up and down arrows, the contents of the browsing line are reported correctly.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

alpha-32185,7e31f30f (2024.3.0.32185)

Windows version:

Windows 11 Version 22H2 (OS Build 22621.3593)

Name and version of other software in use when reproducing the issue:

Visual Studio Code 1.89.1

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Yes

If NVDA add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

hwf1324 avatar May 30 '24 01:05 hwf1324

When the number of characters in a line exceeds 10000, there is a button at the end of the line to show more characters.

I initially thought it was caused by a display optimization done by VS Code that caused the TextInfo offset to be off. (Of course I don't have any knowledge about TextInfo related)

But in VS Code 1.72, the content after 10000 characters is not displayed, and there is no button to display more characters. And the buttons that exist after 1.73 are clicked and subsequent characters are displayed, but the error remains.

And note that although the content after 10000 characters is not displayed, the left and right arrows can be navigated.

Note also that when the characters are just over 10,000, subsequent lines can still be browsed by left and right arrows for individual characters, but when the characters are much more than 10,000, the error also occurs when browsing left and right arrows for subsequent lines.

hwf1324 avatar May 30 '24 01:05 hwf1324

cc: @mltony

hwf1324 avatar May 30 '24 01:05 hwf1324

See also #16060

This is blocked by work in Chromium

seanbudd avatar May 30 '24 02:05 seanbudd

Does this happen also in Firefox?

Adriani90 avatar May 30 '24 04:05 Adriani90

Does this happen also in Firefox?

This issue does not exist in Codespaces in Chrome and Firefox.

hwf1324 avatar May 30 '24 05:05 hwf1324

@hwf1324 could you please test with NVDA last alpha and VS Code 1.91.1? Is this issue still occuring?

cc: @bpasero, @hbons, @daviddossett, @joaomoreno, @kycutler, @lszomoru could you maybe look into this? It might be something going wrong with the exposure of caret position to the accessibility API if there are such long lines. Not sure if VS Code renders off-screen characters automatically on the next line visually. My understanding is that this issue occurs only when a line has more than 10,000 characters without any linebreak in between.

Adriani90 avatar Jul 12 '24 15:07 Adriani90

Yes, NVDA version: alpha-32879,41418d7a (2024.4.0.32879) still has this issue on Visual Studio Code version: 1.91.1 (user setup).

hwf1324 avatar Jul 12 '24 22:07 hwf1324

cc @meganrogge

joaomoreno avatar Oct 28 '24 16:10 joaomoreno

@hwf1324 are you able to reproduce with NVDA 2025.1 RC1 in VS code 1.101.0?

Adriani90 avatar Jun 14 '25 22:06 Adriani90

No changes.

hwf1324 avatar Jun 14 '25 22:06 hwf1324