aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
Commit message (Collapse)AuthorAge
* vim-patch:8.0.1723: using one item array size declaration is misleadingJan Edmund Lazo2019-06-19
| | | | | | | | | | | Problem: Using one item array size declaration is misleading. Solution: Instead of using "[1]" and actually using a larger array, use "[]". This is to verify that this C99 feature works for all compilers. https://github.com/vim/vim/commit/f3a411783c9736645d6ba480c5ff9d861164c040 The following patch is N/A because Neovim requires C99. vim-patch:8.0.1735: flexible array member feature not supported by HP-UX
* vim-patch:8.0.1845: various comment updates needed, missing white space (#10203)Daniel Hahler2019-06-16
| | | | | | | Problem: Various comment updates needed, missing white space. Solution: Update comments, add white space. https://github.com/vim/vim/commit/259f26ac2d41ecfb28b82c651b2bfc1edc7c3e29 Ignored (partly) applied patch for src/nvim/po/it.po.
* vim-patch:8.1.1003: playing back recorded key sequence mistakes key code ↵Daniel Hahler2019-06-16
| | | | | | | (#10155) Problem: Playing back recorded key sequence mistakes key code. Solution: Insert a <Nop> after the <Esc>. (closes vim/vim#4068) https://github.com/vim/vim/commit/6edbbd8114320089c0e603e033775d9dd34cb10a
* vim-patch:8.1.1000: indenting is offJan Edmund Lazo2019-06-01
| | | | | | | Problem: Indenting is off. Solution: Make indenting consistent and update comments. (Ozaki Kiichi, closes vim/vim#4079) https://github.com/vim/vim/commit/fd731b0e31df9f167098c4a77ff894fea6cb7f5c
* lintJan Edmund Lazo2019-05-26
|
* vim-patch:8.1.0020: cannot tell whether a register is executing or recordingJan Edmund Lazo2019-05-26
| | | | | | | | | Problem: Cannot tell whether a register is being used for executing or recording. Solution: Add reg_executing() and reg_recording(). (Hirohito Higashi, closes vim/vim#2745) Rename the global variables for consistency. Store the register name in reg_executing. https://github.com/vim/vim/commit/0b6d911e5de1a1c10a23d4c2ee1b0275c474a2dd
* vim-patch:8.1.1358: cannot enter character with a CSI byteJan Edmund Lazo2019-05-19
| | | | | | | Problem: Cannot enter character with a CSI byte. Solution: Only check "gui.in_use" when VIMDLL is defined. (Ken Takata, closes vim/vim#4396) https://github.com/vim/vim/commit/386b43e59498cc7b52a60f09f74bdb44df99386c
* API/nvim_set_keymap: minor cleanupJustin M. Keyes2019-05-12
| | | | ref #9924
* API: nvim_set_keymap, nvim_del_keymap #9924Yilin Yang2019-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* vim-patch:8.1.1118: a couple of conditions are hard to understandMarco Hinz2019-04-08
| | | | | | | Problem: A couple of conditions are hard to understand. Solution: Split the conditions into pieces. (Ozaki Kiichi) https://github.com/vim/vim/commit/652de23dc7abf6aa2721ccee7fe279b5cce8069c
* keymap, terminal: more keycodes #9810Olivier G-R2019-03-31
| | | | | | | | | - input: recognize <kEqual>, <kComma> - terminal.c: If we need to support function key, a change must be made in libvtermkey. Currently, it emulates strictly VT220 terminal, and returning numeric value in 'normal' mode is the expected behaviour. closes #9810
* keymap: add more (keypad) keycodes #9793Olivier G-R2019-03-29
| | | | | | | | | | | | | | | | | - K_KORIGIN instead of K_KCENTER: This name is similar to what is used by xev. Alternative could be K_KBEGIN as hinted here: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys But I find Begin and Home too similar, and it might induced some confusion. The naming looked related to some old keyboard configuration. - keymap.c: alias KPPeriod to kDel instead of kPoint. This might seems weird, but this is actually the behaviour that should be expected. libtermkey produces "KPPeriod" when num lock is off. To fix this would need to change this name in termkey. closes #9780 closes #9793
* vim-patch:8.1.0932: remove Farsi support (#9622)Justin M. Keyes2019-02-17
| | | | | Problem: Farsi support is outdated and unused. Solution: Delete the Farsi support. https://github.com/vim/vim/commit/14184a3133b9a6ee5f711d493c04e41ba4fa7c2f
* window/ui: reorganize size variables, fix terminal window size with multigrid.Björn Linse2019-01-27
| | | | | | | wp->w_height_inner now contains the "inner" size, regardless if the window has been drawn yet or not. It should be used instead of wp->w_grid.Rows, for stuff that is not directly related to accessing the allocated grid memory, such like cursor movement and terminal size
* ui: multigrid mouse supportBjörn Linse2019-01-20
|
* multigrid: Fix lint errorsUtkarsh Maheshwari2018-12-31
|
* multigrid: Allow UIs to set grid size different from window sizeUtkarsh Maheshwari2018-12-31
|
* vim-patch:8.1.0466: autocmd test failsJan Edmund Lazo2018-10-08
| | | | | | Problem: Autocmd test fails. Solution: Do call inchar() when flushing typeahead. https://github.com/vim/vim/commit/6a2633b00bb00bcf0d994f08d1c54ace2c221b58
* globals: KeyTyped is boolJan Edmund Lazo2018-09-14
|
* getchar: allow <SID> in <Cmd> mappingBjörn Linse2018-09-13
|
* lint: clean-up after parent commitsZviRackover2018-09-09
|
* Remove has_mbytes local to lines changed in parent commitZviRackover2018-09-09
|
* Refactor: Remove occurences of mb_char2bytesZviRackover2018-09-09
|
* lintJan Edmund Lazo2018-09-04
|
* vim-patch:8.1.0052: when mapping to <Nop> times out the next mapping is skippedJan Edmund Lazo2018-09-04
| | | | | | | Problem: When a mapping to <Nop> times out the next mapping is skipped. Solution: Reset "timedout" when waiting for a character. (Christian Brabandt, closes vim/vim#2921) https://github.com/vim/vim/commit/83f4cbd973731872b633d6ba0caf850fb708d70c
* vim-patch:8.0.1020: when a timer calls getchar(1) input is overwrittenJan Edmund Lazo2018-09-04
| | | | | | Problem: When a timer calls getchar(1) input is overwritten. Solution: Increment tb_change_cnt in inchar(). (closes vim/vim#1940) https://github.com/vim/vim/commit/0f0f230012f5a9beb6876158a17b432534836c6f
* Merge #8930 'vim-patch:8.1.0022'Justin M. Keyes2018-08-29
|\
| * getchar: fix {read,copy,start}_redo() paramsJan Edmund Lazo2018-08-29
| | | | | | | | | | | | | | Update function signature as follows: - read_redo(bool, bool) - copy_redo(bool) - start_redo(long, bool)
| * globals: cmd_silent is boolJan Edmund Lazo2018-08-29
| |
| * vim-patch:8.1.0022: repeating put from expression register failsJan Edmund Lazo2018-08-29
|/ | | | | | | Problem: Repeating put from expression register fails. Solution: Re-evaluate the expression register. (Andy Massimino, closes vim/vim#2945) https://github.com/vim/vim/commit/833093bfb0e4a7f89b5adc66babcfa8ac09cfda9
* lint: cleanup after parent commitsZviRackover2018-08-16
|
* Remove has_mbyte from lines near changes in parent commitZviRackover2018-08-16
|
* Remove occurences of mb_head_offZviRackover2018-08-15
|
* Remove all occurences of the mb_ptr2char macroZviRackover2018-08-06
| | | | | | | First step towards implemening issue #7401. The same can be done for all deprecated mb_ functions in follow-up patches.
* lintJan Edmund Lazo2018-08-06
|
* globals: typebuf_was_filled is boolJan Edmund Lazo2018-08-06
|
* vim-patch:8.0.0671: hang when typing CTRL-C in confirm() in timerJan Edmund Lazo2018-08-05
| | | | | | | Problem: When a function invoked from a timer calls confirm() and the user types CTRL-C then Vim hangs. Solution: Reset typebuf_was_filled. (Ozaki Kiichi, closes vim/vim#1791) https://github.com/vim/vim/commit/4eb6531b03445b4d492bc52fea0b6dcd886583af
* vim-patch:8.0.0548: saving the redo buffer only works one time (#8629)KunMing Xie2018-06-24
| | | | | | | Problem: Saving the redo buffer only works one time, resulting in the "." command not working well for a function call inside another function call. (Ingo Karkat) Solution: Save the redo buffer at every user function call. (closes vim/vim#1619) https://github.com/vim/vim/commit/d4863aa99e0527e9505c79cbeafc68a6832200bf
* vim-patch:8.0.0551: the typeahead buffer is reallocated too often (#8598)Jan Edmund Lazo2018-06-20
| | | | | Problem: The typeahead buffer is reallocated too often. Solution: Re-use the existing buffer if possible. https://github.com/vim/vim/commit/d34f9b1155a6b470e1dc766ff98192f440e7eba7
* get_maphash: fix off-by-oneJustin M. Keyes2018-06-14
| | | | | | Patch-by: oni-link <knil.ino@gmail.com> ref: https://github.com/neovim/neovim/pull/6236#discussion_r195113807
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* getchar.c: Fix PVS/V522: Dereference of null pointer mp_matchJustin M. Keyes2018-05-20
|
* Merge #5658 'Apply :lmap in macros'Justin M. Keyes2018-05-17
|\
| * Ensure :lmap mappings take preferenceMatthew Malcomson2018-03-14
| | | | | | | | | | | | If the mental model of :lmap mappings is a translation between your keyboard and vim proper, then they should take preference over :imap (and other) mappings. This patch makes that happen.
| * Record :lmap transformed keys in gotchars()Matthew Malcomson2018-03-14
| | | | | | | | | | | | | | The mental model of :lmap and 'keymap' is of a transformation done before anything else. Hence when recording a macro, or writing to a scriptfile, the transformed keys should be recorded instead of the keys before the transformation.
* | lintJustin M. Keyes2018-04-21
| |
* | IO: let 'fsync' option control more casesJustin M. Keyes2018-04-21
| | | | | | | | | | | | | | | | | | | | | | Vim has the 'swapsync' option which we removed in 62d137ce0969. Instead let 'fsync' control swapfile-fsync. These cases ALWAYS force fsync (ignoring 'fsync' option): - Idle (CursorHold). - Exit caused by deadly signal. - SIGPWR signal. - Explicit :preserve command.
* | Merge branch 'master' into s-dash-stdinb-r-o-c-k2018-04-14
|\ \
| * | insert-mode: interpret unmapped META as ESCJustin M. Keyes2018-04-04
| | | | | | | | | | | | | | | | | | closes #2454 closes #8213 ref #7972
| * | getchar: implement <Cmd> key to invoke command in any modeBjörn Linse2018-03-23
| |/