message: Add tests for some command line special keys
  Includes <C-u>, <C-p>, <C-n>, <C-b>, <C-e>, <Home>, and <End>.
  Fixes
diff: @@ -93,4 +93,66 @@ suite('cmd_line/search command', () => {
  assert.equal(statusBar, '/|123', 'Failed to retain the text on the right of the cursor');
  await modeHandler.handleKeyEvent('<Esc>');
  });
  +
  + test('<C-u> deletes from cursor to first character', async () => {
  + await modeHandler.handleMultipleKeyEvents(':s/abc/xyz'.split(''));
  + await modeHandler.handleMultipleKeyEvents(['<left>', '<left>', '<C-u>']);
  + const statusBar = StatusBar.Get().trim();
  + assert.equal(statusBar, ':|yz');
  + await modeHandler.handleKeyEvent('<Esc>');
  + });
  +
  + test('<C-b> puts cursor at start of command line', async () => {
  + await modeHandler.handleMultipleKeyEvents(':s/abc/xyz'.split(''));
  + await modeHandler.handleKeyEvent('<C-b>');
  + const statusBar = StatusBar.Get().trim();
  + assert.equal(statusBar, ':|s/abc/xyz');
  + await modeHandler.handleKeyEvent('<Esc>');
  + });
  +
  + test('<Home> puts cursor at start of command line', async () => {
  + await modeHandler.handleMultipleKeyEvents(':s/abc/xyz'.split(''));
  + await modeHandler.handleKeyEvent('<Home>');
  + const statusBar = StatusBar.Get().trim();
  + assert.equal(statusBar, ':|s/abc/xyz');
  + await modeHandler.handleKeyEvent('<Esc>');
  + });
  +
  + test('<C-e> puts cursor at end of command line', async () => {
  + await modeHandler.handleMultipleKeyEvents(':s/abc/xyz'.split(''));
  + await modeHandler.handleMultipleKeyEvents(['<C-b>', '<C-e>']);
  + const statusBar = StatusBar.Get().trim();
  + assert.equal(statusBar, ':s/abc/xyz|');
  + await modeHandler.handleKeyEvent('<Esc>');
  + });
  +
  + test('<End> puts cursor at end of command line', async () => {
  + await modeHandler.handleMultipleKeyEvents(':s/abc/xyz'.split(''));
  + await modeHandler.handleMultipleKeyEvents(['<Home>', '<End>']);
  + const statusBar = StatusBar.Get().trim();
  + assert.equal(statusBar, ':s/abc/xyz|');
  + await modeHandler.handleKeyEvent('<Esc>');
  + });
  +
  + test('<C-p>/<C-n> go to the previous/next command', async () => {
  + // Establish a history - :s/a/b, then :s/x/y.
  + // :w is the current one, not yet confirmed
  + await modeHandler.handleMultipleKeyEvents(':s/a/b\n'.split(''));
  + await modeHandler.handleMultipleKeyEvents(':s/x/y\n'.split(''));
  + await modeHandler.handleMultipleKeyEvents([':', 'w', '<C-p>']);
  +
  + // Going backward - :s/x/y, then :s/a/b
  + assert.equal(StatusBar.Get().trim(), ':s/x/y|');
  + await modeHandler.handleKeyEvent('<C-p>');
  + assert.equal(StatusBar.Get().trim(), ':s/a/b|');
  +
  + // Going forward again - :s/x/y, then :w (the one we started typing)
  + await modeHandler.handleKeyEvent('<C-n>');
  + assert.equal(StatusBar.Get().trim(), ':s/x/y|');
  + await modeHandler.handleKeyEvent('<C-n>');
  +
  + // TODO: Really, this should be `:w|`. See #4093.
  + assert.equal(StatusBar.Get().trim(), ':|');
  + await modeHandler.handleKeyEvent('<Esc>');
  + });
  });
  