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

Create new event handler method wants to put method at start of class #4691

Closed
mrward opened this Issue Apr 27, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@mrward
Member

mrward commented Apr 27, 2018

VS Mac 7.5.0.1236.

To repro

  1. Create a large class. To verify this I created a single view iOS project and opened the AppDelegate.cs - The class should have many lines so the 'class' header definition is not visible when you are at the end of the class.
  2. Go to the end of the class.
  3. Create an event at the end of the class.
    public event EventHandler Foo;
  4. Create a method after this event handler and then type in:
    this.Foo +=
  5. Select Handler_Foo in the intellisense window that opens.

eventhandlermethodinsertion2

Expected result

The insertion point for the event handler method is near where you are in the code. Above or below the method you are in.

Actual result

The insertion point is at the start of the class.
If the class header is not visible the insertion point is not shown since the text editor does not seem to scroll to line.
This moves you away from where you are coding so you lose context.

VS bug #607580

mkrueger added a commit that referenced this issue May 16, 2018

mkrueger added a commit that referenced this issue May 17, 2018

Merge pull request #4813 from mono/master-issue4691
Fixes issue #4691 Create new event handler method wants to put method
@xamarin-release-manager

This comment has been minimized.

Contributor

xamarin-release-manager commented May 17, 2018

Fixed in version 7.6.0.835 (master)

Pull Request #4813 merged by: Mike Krüger
Author: mono
Commit: e32d088 (mono/monodevelop)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment