Skip to content

Commit

Permalink
Modify OpenLineAbove/Down Command handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosifne committed Oct 18, 2024
1 parent 3300bae commit b24ed61
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ private void CommitIfActive(EditorCommandArgs args, IUIThreadOperationContext op
if (renameService.ActiveSession != null)
{
var selection = args.TextView.Selection.VirtualSelectedSpans.First();

Commit(operationContext);

var translatedSelection = selection.TranslateTo(args.TextView.TextBuffer.CurrentSnapshot);
args.TextView.Selection.Select(translatedSelection.Start, translatedSelection.End);
args.TextView.Caret.MoveTo(translatedSelection.End);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void ExecuteCommand(OpenLineAboveCommandArgs args, Action nextHandler, Co
{
HandlePossibleTypingCommand(args, nextHandler, context.OperationContext, (activeSession, operationContext, span) =>
{
Commit(operationContext);
CommitOrCancel(args, operationContext);
nextHandler();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void ExecuteCommand(OpenLineBelowCommandArgs args, Action nextHandler, Co
{
HandlePossibleTypingCommand(args, nextHandler, context.OperationContext, (activeSession, operationContext, span) =>
{
Commit(operationContext);
CommitOrCancel(args, operationContext);
nextHandler();
});
}
Expand Down

0 comments on commit b24ed61

Please sign in to comment.