-
Notifications
You must be signed in to change notification settings - Fork 28k
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
After formatting JSON you need to scroll left to see the formatted result #48051
Comments
(Experimental duplicate detection) |
Do you mean the mini-map? |
Also, can you share the file with us and does this reproduce when running with extensions? |
Yep the mini-map in the top right. I can't reproduce it with just a tiny line of JSON. How can I send you a longer string that I don't want to send via GitHub? |
You could mail it to me, but before that. How large (in MB) is that file? Is it hitting our limits? |
1388 characters according to vscode so you'll be fine :) It's a line of JSON I pasted from a log file. |
Ok, please send to jrieken[at]microsoft.com. Thanks |
Done! |
Hm, works for me. After hitting format I see that the file as 58 lines, the only slightly weird thing is that most content is scrolled horizontally and line 19 is mostly visible. Scrolling left shows all content for me.. |
Ah that seems to be a better description indeed. I don't see line 19 but indeed, if I scroll left I see all content. So no refresh is needed but something like scroll left and top would be nice. |
@alexandrudima Could this also be related to the |
No, it is not related to that. The editor will try as much as possible to maintain the previous scroll position. I guess the formatter should call one of the |
Same issue here (1.23.0). I would describe it as the scrollbar not updating on formatting. Specifically, when pasting a large amount of minified content like JSON into VS Code, it comes in as one long line and the horizontal scrollbar handle is very small compared to the track. When the document is formatted, the scrollbar isn't updating to fit the now normal width content. While you can scroll left all the way to see the content, the scrollbar remains too large. Switching to another tab, and back again forces the scrollbar length to update, which has the side effect of forcing the content back into view. |
I'm also encountering this behavior. If specific examples are desired, please advise and I'll scrub some examples to share. |
Issue Type: Bug
After formatting text as JSON, the small preview in the top right shows the JSON neatly formatted. The main window is empty but does show line numbers.
Workaround: Scroll left or switch back and forth between screens to see the formatted JSON.
VS Code version: Code 1.22.2 (3aeede7, 2018-04-12T16:32:53.389Z)
OS version: Darwin x64 17.5.0
System Info
Extensions (7)
The text was updated successfully, but these errors were encountered: