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

Line numbers start counting from cursor position #302

Closed
stevenlis opened this issue Apr 3, 2024 · 6 comments · Fixed by #339
Closed

Line numbers start counting from cursor position #302

stevenlis opened this issue Apr 3, 2024 · 6 comments · Fixed by #339
Labels
bug Something isn't working mac Problem is specific to Mac

Comments

@stevenlis
Copy link

v0.11.19

vscode:
Version: 1.87.2
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:20:57.520Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.4.0

I discovered a strange bug where the line numbers start counting from the cursor position when I use the print command instead of starting from 1.

CS-bAdokOCu@2x

CS-sc5Ych2d@2x

@PeterWone
Copy link
Collaborator

I just wanted you to know that we will get this this issue after build pipeline problems are resolved.

@PeterWone
Copy link
Collaborator

PeterWone commented May 20, 2024

The build pipeline is still a shambles but I am at least now able to do manual publishing to the marketplace.

I think I know what's going on with this bug you found. The line number starting from the start line of the current selection is correct behaviour for printing a selection. Now I just have to step through that block of code to see why it's using that.

Interestingly it doesn't happen on my system using Windows. I have a Mac for testing, looks like I'll be setting it up again.

@PeterWone PeterWone added bug Something isn't working mac Problem is specific to Mac labels May 20, 2024
@PeterWone
Copy link
Collaborator

It's not happening on my Mac either. I really hate this kind of mystery.

@PeterWone
Copy link
Collaborator

Steve, can you still reproduce this with the latest release?

@stevenlis
Copy link
Author

@PeterWone I just tried, and it seems I still do with v0.11.28.
CS-H3HeSuNk@2x

@PeterWone
Copy link
Collaborator

PeterWone commented Jul 19, 2024

Finally managed to reproduce this when a colleague reproduced a variant of the same problem. It also occurs for unsaved files. For that specific execution path there was an if statement with a faulty condition making it report selection. Other code was correcting most of the problem but it was setting the starting line number to the beginning of the selection. There must be another bug, this one platform dependent, causing tilde paths to fail to match the doc URI path, in order to hit that branch. You really did have a perfect storm going on there.

@PeterWone PeterWone linked a pull request Jul 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mac Problem is specific to Mac
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants