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

Edit IL Instructions (kinda) ignores selection #256

Open
Symbai opened this issue Nov 5, 2023 · 5 comments
Open

Edit IL Instructions (kinda) ignores selection #256

Symbai opened this issue Nov 5, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@Symbai
Copy link

Symbai commented Nov 5, 2023

Problem Description

In the classic version of dnSpy when editing a method using C# fails (which happens extremely often) a workaround was to select the code I want to edit and then right click -> edit IL instructions. In the new dialog dnSpy then has pre-selected all the IL instructions from the C# code I've selected. Now im using dnSpyEx version 6.4.1 and it doesn't pre-selected all of the IL instructions, only part of it.

See example below where I select a whole loop but it only preselects the first line of the inner loop.

Proposal

Preselect all instructions from the selected C# code in main window.

Alternatives

No response

Additional Context

bandicam.2023-11-05.08-05-15-979.mp4
@Symbai Symbai added the enhancement New feature or request label Nov 5, 2023
@ElektroKill
Copy link
Member

Could you provide additional images/video of how it looks like in old dnSpy versions? If you could also provide the file you are working with, I'd be thankful too as that would make reproducing the issue on my end easier!

@GazziFX
Copy link

GazziFX commented Nov 5, 2023

IIRC it selects instructions of the only one line wich was right clicked and not respect text selection

@Symbai
Copy link
Author

Symbai commented Nov 7, 2023

Would it be possible to respect whole text selection? If it gets the IL instructions from the one line it was right clicked at it should also be able to get all IL instructions from all selected lines.

@ElektroKill I was using BitArray constructor from .NET runtime. You can basically use any assembly for repro.

@ElektroKill
Copy link
Member

Hi, are you sure that the non-Ex version selects the code for the entire selection? I downloaded dnSpy 6.1.8 and tried and it behaves the same as the current dnSpyEx version.

@Symbai
Copy link
Author

Symbai commented Nov 8, 2023

I was sure but now I'm not. I cannot reproduce it with non-Ex either. Maybe it worked in the past... dnSpy got heavily rewritten at some point but that was several years ago.

Its always a pain in the butt if you don't know IL that much to identify and delete the lines of code you want. So even if this is not a bug, then please consider it as a feature request.

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

No branches or pull requests

3 participants