neovim/test/functional/terminal
Matthew Malcomson dfb676fe0d edit.c: Ensure undo sync when emulating <Esc>x #11706
After PR #8226 an unmapped META key in insert mode behaves like
ESC-<key> (:help i_META).

The behaviour does not fully match, since if <Esc>-<key> is pressed
manually then since it were pressed manually `gotchars` would be called
on the second <key> after insert-mode had already been left.

This would mean that `may_sync_undo` (called from `gotchars`) would
call `u_sync(FALSE)` on the second key (since we would be in normal
mode).

This overall means that <Meta-[something]> behaves differently with
respect to undo than <Esc>[something] when the [something] makes a
change.

As an example, under `nvim -u NONE`:
ihello<M-.>u

leaves the buffer empty, while
ihello<Esc>.u

leaves the buffer with one instance of `hello`.

- Fix by calling u_sync() manually in the new clause under
  `normalchar:` in `insert_handle_key`.
- Update test in tui_spec.lua that accidentally relied on the old behaviour.
2020-01-12 17:09:39 -08:00
..
altscreen_spec.lua :terminal : set topline based on window height #8325 2019-01-29 03:00:48 +01:00
api_spec.lua defaults: 'showcmd', 'belloff', 'ruler' 2017-03-16 18:44:10 +01:00
buffer_spec.lua API: deprecate nvim_command_output 2019-12-02 20:52:06 -08:00
cursor_spec.lua :terminal : set topline based on window height #8325 2019-01-29 03:00:48 +01:00
edit_spec.lua tests: shell-test: use count for REP (#10514) 2019-07-16 21:35:53 +02:00
ex_terminal_spec.lua tests: ex_terminal_spec: retry ":terminal (with fake shell)" (#11588) 2019-12-22 11:23:39 +01:00
helpers.lua tests/ui: make screen.lua use "linegrid" representation internally 2019-10-13 22:10:42 +02:00
highlight_spec.lua terminal: add tests for palette color forwarding 2019-11-03 10:14:58 +01:00
mouse_spec.lua tests/ui: remove unnecessary screen:detach() 2019-10-13 22:10:42 +02:00
scrollback_spec.lua test/Screen:expect: replace "{IGNORE}" with "{MATCH:…}" 2019-11-09 22:26:01 -08:00
tui_spec.lua edit.c: Ensure undo sync when emulating <Esc>x #11706 2020-01-12 17:09:39 -08:00
window_spec.lua test/ui: update tests for new msg_grid implementation 2019-09-01 15:55:10 +02:00
window_split_tab_spec.lua test: win: enable WinEnter terminal test 2019-08-18 21:40:27 -04:00