-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Make immediate window buffer writable before applying completion edit #28131
Conversation
@dotnet/roslyn-ide Please review. |
} | ||
|
||
_debuggerTextLinesOpt.GetStateFlags(out var bufferFlags); | ||
_debuggerTextLinesOpt.SetStateFlags((uint)((BUFFERSTATEFLAGS)bufferFlags & ~BUFFERSTATEFLAGS.BSF_USER_READONLY)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have this same stuff going on in DebuggerIntellisenseFilter.cs:
roslyn/src/VisualStudio/Core/Def/Implementation/DebuggerIntelliSense/DebuggerIntellisenseFilter.cs
Lines 98 to 99 in 70c4eaf
_context.DebuggerTextLines.GetStateFlags(out var bufferFlags); | |
_context.DebuggerTextLines.SetStateFlags((uint)((BUFFERSTATEFLAGS)bufferFlags & ~BUFFERSTATEFLAGS.BSF_USER_READONLY)); |
Was this the right place for that all along? It seems like yes, because commits indeed can come through not through the commanding system. Should that other code be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the other code needs to stay there so that characters are written to to buffer as you type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AmadeusW Do we have this happening in our new system as well?
@dpoeschl is the editor taking care of this magic in the new implementation? |
@jasonmalinowski This hack is needed because of the way the Immediate Window works. Has nothing to do with editor. The right fix is to kill Immediate Window with fire. |
In the new intellisense implementation, the file you're editing no longer exists -- it's moved over to the editor. They already have to reimplement other hacks to deal with debugger windows, because we can't fix them anymore either. |
test windows_release_vs-integration_prtest please |
@jasonmalinowski I see. Hmm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the editor now has dependency on Immediate Window? That's very unfortunate. |
@jasonmalinowski we do not have special handling for this. This is unfortunate that immediate window acts this way. Once we have working Roslyn bits, we will be able to solve this. I will create a dev16 bug to track this. |
Approved. I assigned myself bug 640224: In Async Completion, mark the immediate window's buffer as non-read-only during commit |
I can't approve 😭 |
test windows_release_vs-integration_prtest please |
@jinujoseph for 15.8 approval |
Approved to merge for 15.8.Preview5 |
Customer scenario
VS crashes when completion in Immediate Window is committed by double-clicking on the completion item.
Bugs this fixes
VSO 384025
#24565
Workarounds, if any
Complete using
tab
.Risk
Small.
Performance impact
None.
Is this a regression from a previous update?
Root cause analysis
How was the bug found?
Customer reported.
Test documentation updated?