public void MappedSpecialKey() { // Reported in #2683. var command = "%s//g"; _vimBuffer.Process($":map Q :{command}<PageUp>", enter: true); Assert.Equal(ModeKind.Normal, _vimBuffer.ModeKind); _vimBuffer.Process("Q"); Assert.Equal(ModeKind.Command, _vimBuffer.ModeKind); var expectedCaretPosition = command.Length; var expectedCommand = new EditableCommand(command, expectedCaretPosition); Assert.Equal(expectedCommand, _vimBuffer.CommandMode.EditableCommand); Assert.Equal(":" + command, _control.CommandLineTextBox.Text); Assert.Equal(expectedCaretPosition + 1, _control.CommandLineTextBox.SelectionStart); }
public int ProcessCommand(int data, EditableCommand command) { ProcessValue = Tuple.Create(data, command.Text, false); return(ProcessReturn ?? data); }
public int Completed(int data, EditableCommand command, bool wasMapped) { CompletedValue = Tuple.Create(data, command.Text, wasMapped); return(CompletedReturn ?? data); }