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

In Inspect Token and Scopes, the character count doesn't represent the number of characters in the scope #242367

Open
msftrncs opened this issue Mar 1, 2025 · 1 comment
Assignees

Comments

@msftrncs
Copy link

msftrncs commented Mar 1, 2025

Does this issue occur when all extensions are disabled?: Yes/No - not immediately tested

Version: 1.97.2 (user setup)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

  1. Consider a C/C++ commented block, such as
    /*
    |date:               |author:  |state:               |comments:                                             |
    */
  2. Open Inspect editor Token and Scopes from the command pallet and place the cursor in the comment (on the line with the date: above).

There is more than 41 characters in the scope, but the Inspect Tokens and Scopes dialog is only showing 41 characters (40 and an elipse), so the number of characters indicated is the number of characters in the truncated string in the dialog, not the actual number of characters in the scope that is represented by the 41 characters being shown.

Image

|date:··············…···················|41 chars
@RedCMD
Copy link
Contributor

RedCMD commented Mar 1, 2025

can confirm
the count doesn't seem to go above 41
it always claims 41 chars even when there's hundreds
@alexdima
this is most definitely a regression
Image

also the triple dots (and string splitting) should start when there's 42 chars instead of when there's 41 chars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants