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)); }
void IChainedCommandHandler <DeleteKeyCommandArgs> .ExecuteCommand(DeleteKeyCommandArgs args, Action nextHandler, CommandExecutionContext context) { ExecuteBackspaceOrDelete(args.TextView, nextHandler, isDelete: true); }
CommandState IChainedCommandHandler <DeleteKeyCommandArgs> .GetCommandState(DeleteKeyCommandArgs args, Func <CommandState> nextHandler) { AssertIsForeground(); return(nextHandler()); }
public CommandState GetCommandState(DeleteKeyCommandArgs args, Func <CommandState> nextHandler) => GetCommandState(nextHandler);
void ICommandHandler <DeleteKeyCommandArgs> .ExecuteCommand(DeleteKeyCommandArgs args, Action nextHandler) { ExecuteBackspaceOrDelete(args.TextView, nextHandler, isDelete: true); }
bool ICommandHandler <DeleteKeyCommandArgs> .ExecuteCommand(DeleteKeyCommandArgs args, CommandExecutionContext executionContext) { GetOperations(args.TextView).Delete(); return(true); }
CommandState ICommandHandler <DeleteKeyCommandArgs> .GetCommandState(DeleteKeyCommandArgs args) { return(AvailableInEditableView(args.TextView)); }