neovim/test/functional
Yilin Yang fbf2c414ad API: nvim_set_keymap, nvim_del_keymap #9924
closes #9136

- Treat empty {rhs} like <Nop>

- getchar.c: Pull "repl. MapArg termcodes" into func
  The "preprocessing code" surrounding the replace_termcodes calls needs
  to invoke replace_termcodes, and also check if RHS is equal to "<Nop>".
  To reduce code duplication, factor this out into a helper function.

  Also add an rhs_is_noop flag to MapArguments; buf_do_map_explicit
  expects an empty {rhs} string for "<Nop>", but also needs to distinguish
  that from something like ":map lhs<cr>" where no {rhs} was provided.

- getchar.c: Use allocated buffer for rhs in MapArgs
  Since the MAXMAPLEN limit does not apply to the RHS of a mapping (or
  else an RHS that calls a really long autoload function from a plugin
  would be incorrectly rejected as being too long), use an allocated
  buffer for RHS rather than a static buffer of length MAXMAPLEN + 1.

- Mappings LHS and RHS can contain literal space characters, newlines, etc.

- getchar.c: replace_termcodes in str_to_mapargs
  It makes sense to do this; str_to_mapargs is, intuitively, supposed to
  take a "raw" command string and parse it into a totally "do_map-ready"
  struct.

- api/vim.c: Update lhs, rhs len after replace_termcodes
  Fixes a bug in which replace_termcodes changes the length of lhs or rhs,
  but the later search through the mappings/abbreviations hashtables
  still uses the old length value. This would cause the search to fail
  erroneously and throw 'E31: No such mapping' errors or 'E24: No such
  abbreviation' errors.

- getchar: Create new map_arguments struct
  So that a string of map arguments can be parsed into a more useful, more
  portable data structure.

- getchar.c: Add buf_do_map function
  Exactly the same as the old do_map, but replace the hardcoded references
  to the global `buf_T* curbuf` with a function parameter so that we can
  invoke it from nvim_buf_set_keymap.

- Remove gettext calls in do_map error handling
2019-05-12 11:44:48 +02:00
..
api API: nvim_set_keymap, nvim_del_keymap #9924 2019-05-12 11:44:48 +02:00
autocmd cursormoved: add tests for CursorMoved 2019-03-29 10:58:53 +01:00
cmdline
core test/channels_spec: cleanup 2019-05-12 00:43:28 +02:00
eval test/channels_spec: cleanup 2019-05-12 00:43:28 +02:00
ex_cmds vim-patch:8.0.1782: no simple way to label quickfix entries 2019-05-05 13:46:19 +02:00
fixtures test/env: multibyte env var to child process 2019-02-28 22:40:11 +01:00
insert insert-mode: interpret unmapped META as ESC 2018-04-04 03:23:15 +02:00
legacy test: clear(): args_rm parameter 2019-04-27 16:19:40 +02:00
lua Merge #9686 'win/Lua: monkey-patch os.getenv()' 2019-03-16 20:28:52 +01:00
normal jumplist: avoid extra tail entry #9805 2019-04-02 00:50:28 +02:00
options win/defaults: Use "…/nvim-data/site" in 'runtimepath' 2019-04-28 00:27:07 +02:00
plugin functionaltest: win: enable shada FileWriteCmd 2018-10-31 22:55:07 -04:00
provider test: cleanup 2019-05-05 23:01:35 +02:00
shada jumplist: avoid extra tail entry #9805 2019-04-02 00:50:28 +02:00
terminal UI/nvim_ui_attach(): add override option 2019-05-09 22:27:41 +02:00
ui UI/ext_messages: learn more message kinds 2019-05-11 23:42:55 +02:00
viml tests: adjust to latest Vim patches 2019-05-05 14:05:25 +02:00
example_spec.lua vim-patch:8.1.{0849,1001}: 'cursorline' highlight #9757 2019-03-19 12:24:41 +01:00
helpers.lua terminal: swap priority of terminal, editor highlights 2019-05-02 09:56:22 +02:00
preload.lua