Skip to content

Commit

Permalink
Fix shift-enter behavior
Browse files Browse the repository at this point in the history
If completion and brace completion are both active, shift-enter should
commit both and complete the statement. This was not working because the
completion command handler never called next handler for shift-enter and
the line ender command handler was not ordered correctly.

Fixes dotnet#18065
  • Loading branch information
Ravi Chande committed Jul 19, 2017
1 parent 1c66719 commit 4ba0545
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ void ICommandHandler<AutomaticLineEnderCommandArgs>.ExecuteCommand(AutomaticLine
if (!committed)
{
this.DismissSessionIfActive();
nextHandler();
}

nextHandler();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.AutomaticCompletion
' visual basic automatic line ender command handler
' </summary>
<ExportCommandHandler(PredefinedCommandHandlerNames.AutomaticLineEnder, ContentTypeNames.VisualBasicContentType)>
<Order(Before:=PredefinedCommandHandlerNames.Completion)>
<Order(After:=PredefinedCommandHandlerNames.Completion)>
Friend Class AutomaticLineEnderCommandHandler
Inherits AbstractAutomaticLineEnderCommandHandler

Expand Down

0 comments on commit 4ba0545

Please sign in to comment.