public void ExecuteCommand(DeleteKeyCommandArgs args, Action nextHandler, CommandExecutionContext context)
 {
     HandlePossibleTypingCommand(args, nextHandler, span =>
     {
         var caretPoint = args.TextView.GetCaretPoint(args.SubjectBuffer);
         if (!args.TextView.Selection.IsEmpty || caretPoint.Value != span.End)
         {
             nextHandler();
         }
     });
 }
        public void ExecuteCommand(DeleteKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
        {
            if (Enabled(args.TextView) && Manager(args.TextView).HasActiveSessions)
            {
                bool handledCommand = false;

                Manager(args.TextView).PreDelete(out handledCommand);

                if (handledCommand)
                {
                    return;
                }

                nextCommandHandler();

                Manager(args.TextView).PostDelete();

                return;
            }
            nextCommandHandler();
        }
 public CommandState GetCommandState(DeleteKeyCommandArgs args, Func <CommandState> nextHandler)
 {
     return(GetCommandState(nextHandler));
 }
 public void ExecuteCommand(DeleteKeyCommandArgs args, Action nextHandler)
 {
     AssertIsForeground();
     ExecuteCommandWorker(args, nextHandler);
 }
 public CommandState GetCommandState(DeleteKeyCommandArgs args, Func <CommandState> nextHandler)
 {
     AssertIsForeground();
     return(GetCommandStateWorker(args, nextHandler));
 }
Exemple #6
0
 void IChainedCommandHandler <DeleteKeyCommandArgs> .ExecuteCommand(DeleteKeyCommandArgs args, Action nextHandler, CommandExecutionContext context)
 {
     ExecuteBackspaceOrDelete(args.TextView, nextHandler, isDelete: true);
 }
Exemple #7
0
 CommandState IChainedCommandHandler <DeleteKeyCommandArgs> .GetCommandState(DeleteKeyCommandArgs args, Func <CommandState> nextHandler)
 {
     AssertIsForeground();
     return(nextHandler());
 }
Exemple #8
0
 public CommandState GetCommandState(DeleteKeyCommandArgs args, Func <CommandState> nextHandler)
 => GetCommandState(nextHandler);
Exemple #9
0
 void ICommandHandler <DeleteKeyCommandArgs> .ExecuteCommand(DeleteKeyCommandArgs args, Action nextHandler)
 {
     ExecuteBackspaceOrDelete(args.TextView, nextHandler, isDelete: true);
 }
Exemple #10
0
 bool ICommandHandler <DeleteKeyCommandArgs> .ExecuteCommand(DeleteKeyCommandArgs args, CommandExecutionContext executionContext)
 {
     GetOperations(args.TextView).Delete();
     return(true);
 }
Exemple #11
0
 CommandState ICommandHandler <DeleteKeyCommandArgs> .GetCommandState(DeleteKeyCommandArgs args)
 {
     return(AvailableInEditableView(args.TextView));
 }