aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/digraph.c
Commit message (Collapse)AuthorAge
...
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: move some mapping-related code to a separate file (#19061)zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | This marks the following Vim patches as ported: vim-patch:8.1.1785: map functionality mixed with character input Problem: Map functionality mixed with character input. Solution: Move the map functionality to a separate file. (Yegappan Lakshmanan, closes vim/vim#4740) Graduate the +localmap feature. https://github.com/vim/vim/commit/b66bab381c8ba71fd6e92327d1d34c6f8a65f2a7 vim-patch:8.2.3643: header for source file is outdated Problem: Header for source file is outdated. Solution: Make the header more accurate. (closes vim/vim#9186) https://github.com/vim/vim/commit/a3f83feb63eae5464a620ae793c002eb45f7a838 Also cherry-pick a change for <unique> mappings from patch 8.2.0807. Rename map_clear_mode() to do_mapclear().
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): format all c code under /src/nvim/Dundar Goc2022-04-29
|
* revert: "refactor: Remove allow_keys global (#6346)"zeertzjq2022-04-29
|
* refactor: add pure attribute to pure functionsDundar Göc2022-04-13
| | | | | This will allow compilers that support the pure attribute to make further optimizations to functions.
* refactor(digraph.c): add more const qualifierszeertzjq2022-04-12
|
* vim-patch:8.2.3226: new digraph functions use old naming schemezeertzjq2022-04-12
| | | | | | Problem: New digraph functions use old naming scheme. Solution: Use the digraph_ prefix. (Hirohito Higashi, closes vim/vim#8580) https://github.com/vim/vim/commit/29b857150c111a455f1a38a8f748243524f692e1
* vim-patch:8.2.3184: cannot add a digraph with a leading spacezeertzjq2022-04-12
| | | | | | | | | | | | | | | Problem: Cannot add a digraph with a leading space. It is not easy to list existing digraphs. Solution: Add setdigraph(), setdigraphlist(), getdigraph() and getdigraphlist(). (closes vim/vim#8580) https://github.com/vim/vim/commit/6106504e9edc8500131f7a36e59bc146f90180fa Use GA_APPEND_VIA_PTR in registerdigraph(). Use tv_list_append_*() in getdigraphlist_appendpair(). Put the error messages in digraph.c. E196 is N/A. Remove mentions about 'encoding' being non-Unicode. Nvim doesn't support setting encoding=japan, so skip a test.
* refactor: minimize variable scope and eliminate empty declarationsDundar Göc2022-03-13
|
* refactor: fix clint warnings (#17682)dundargoc2022-03-13
|
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: reduce number of unique char castsDundar Göc2021-10-13
|
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor: format with uncrustify #15726dundargoc2021-09-20
|
* refactor: replace TRUE/FALSE macros with C99 true/falseDundar Göc2021-07-25
|
* vim-patch:8.2.1635: no digraph for 0x2022 BULLET #12876Jan Edmund Lazo2020-09-08
| | | | | Problem: No digraph for 0x2022 BULLET. Solution: Use "oo". (Hans Ginzel, closes vim/vim#6904) https://github.com/vim/vim/commit/57ad94c5a9ee6f3626e1ec728519a8558a4346c8
* vim-patch:8.1.1588: in :let-heredoc line continuation is recognizedJurica Bradaric2019-10-07
| | | | | | Problem: In :let-heredoc line continuation is recognized. Solution: Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580) https://github.com/vim/vim/commit/e96a2498f9a2d3e93ac07431f6d4afd77f30afdf
* vim-patch:8.1.0586: :digraph output is not easy to readJan Edmund Lazo2019-10-06
| | | | | | | Problem: :digraph output is not easy to read. Solution: Add highlighting for :digraphs. (Marcin Szamotulski, closes vim/vim#3572) Also add section headers for :digraphs!. https://github.com/vim/vim/commit/eae8ae1b2b4e532b125077d9838b70d966891be3
* vim-patch:8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"Jan Edmund Lazo2019-10-06
| | | | | | Problem: Displayed digraph for "ga" wrong with 'encoding' "cp1251". Solution: Convert from 'encoding' to "utf-8" if needed. (closes vim/vim#3015) https://github.com/vim/vim/commit/bc5020aa4d7ef4aea88395eff858f74fc881eab9
* getdigits: introduce `strict`, `def` parametersJustin M. Keyes2019-09-13
| | | | | | | | | | | | Problem: During a refactor long ago, we changed the `getdigits_*` familiy of functions to abort on overflow. But this is often wrong, because many of these codepaths are handling user input. Solution: Decide at each call-site whether to use "strict" mode. fix #5555
* Remove excess <stdint.h>Jan Edmund Lazo2019-09-11
|
* vim-patch:8.1.1923: some source files are not in a normal encoding (#10852)Daniel Hahler2019-08-26
| | | | | | Problem: Some source files are not in a normal encoding. Solution: Convert hangulin.c from euc-kr to utf-8 and digraph.c from latin1 to utf-8. (Daniel Hahler, closes vim/vim#4731) https://github.com/vim/vim/commit/4119309d70c7fc32637e77f2e84c185ad1768892
* refactor: enable -Wconversion for ex_getln.cBjörn Linse2019-07-19
|
* :digraphs : check for CTRL-C less often #10376Justin M. Keyes2019-06-30
| | | No need to do this so frequently.
* vim-patch:8.0.1553: find digraph to insert a character #8190lokesh11972018-10-30
| | | | | | | | Problem: Cannot see what digraph is used to insert a character. Solution: Show the digraph with the "ga" command. (Christian Brabandt) https://github.com/vim/vim/commit/5f73ef8d20070cd45c9aea4dc33c2e0657f5515c close #8190
* ui: disable clearing almost everywhereBjörn Linse2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid clearing the screen in most situations. NOT_VALID should be equivalent to CLEAR unless some external force messed up the terminal, for these situations <c-l> and :mode will still clear the screen. Also eliminate some obsolete code in screen.c, that dealt with that in vim drawing window 1 can mess up window 2, but this never happens in nvim. But what about slow terminals? There is two common meanings in which a terminal is said to be "slow": Most commonly (and in the sense of vim:s nottyfast) it means low bandwidth for sending bytes from nvim to the terminal. If the screen is very similar before and after the update_screen(CLEAR) this change should reduce bandwidth. If the screen is quite different, but there is no new regions of contiguous whitespace, clearing doesn't reduce bandwidth significantly. If the new screen contains a lot of whitespace, it will depend of if vsplits are used or not: as long as there is no vsplits, ce is used to cheaply clear the rest of the line, so full-screen clear is not needed to reduce bandwith. However a left vsplit currently needs to be padded with whitespace all the way to the separator. It is possible ec (clear N chars) can be used to reduce bandwidth here if this is a problem. (All of this assumes that one doesn't set Normal guibg=... on a non-BCE terminal, if you do you are doomed regardless of this change). Slow can also mean that drawing pixels on the screen is slow. E-ink screens is a recent example. Avoiding clearing and redrawing the unchanged part of the screen will always improve performance in these cases.
* Merge pull request #8945 from ZviRackover/fix-7401-step5Björn Linse2018-09-11
|\ | | | | mbyte: remove mb_char2bytes
| * Refactor: Remove occurences of mb_char2bytesZviRackover2018-09-09
| |
* | digraph: delete code that checks enc_utf8Jan Edmund Lazo2018-09-08
| | | | | | | | enc_utf8 is always true in nvim.
* | digraph: refactor code that checks has_mbyteJan Edmund Lazo2018-09-08
| | | | | | | | has_mbyte is always true in nvim.
* | vim-patch:8.0.0749: some unicode digraphs are hard to rememberJan Edmund Lazo2018-09-08
|/ | | | | | Problem: Some unicode digraphs are hard to remember. Solution: Add alternatives with a backtick. (Chris Harding, closes vim/vim#1861) https://github.com/vim/vim/commit/816e7660e1efb918ad85b5c78d21b957d1bcad17
* 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.
* 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
* Merge #5658 'Apply :lmap in macros'Justin M. Keyes2018-05-17
|\
| * clintMatthew Malcomson2018-03-14
| |
| * 'keymap' now uses :lmap instead of :lnoremapMatthew Malcomson2018-03-14
| | | | | | | | | | | | | | This means that the major way that :lmap mappings are applied works as one would expect with macros. This also means that having a translation with 'keymap' does not preclude using mappings in insert mode with :imap.
* | :digraphs : highlight with hl-SpecialKey #2690Jakson Alves de Aquino2018-05-01
|/ | | | closes #2690
* free_buf_options(): free buf_T.b_kmap_gaJustin M. Keyes2018-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASAN log: ==23244==ERROR: LeakSanitizer: detected memory leaks Direct leak of 3348 byte(s) in 228 object(s) allocated from: 0 0x4ee3d3 in malloc /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3 1 0xf4e681 in try_malloc /home/travis/build/neovim/neovim/src/nvim/memory.c:87:15 2 0xf4e8a9 in xmalloc /home/travis/build/neovim/neovim/src/nvim/memory.c:121:15 3 0xf4ee68 in xmallocz /home/travis/build/neovim/neovim/src/nvim/memory.c:196:15 4 0x170e3ee in vim_strnsave /home/travis/build/neovim/neovim/src/nvim/strings.c:70:28 5 0x73b2ff in ex_loadkeymap /home/travis/build/neovim/neovim/src/nvim/digraph.c:1814:16 6 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5 7 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20 8 0xaee67d in do_source /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2970:3 9 0xae82ae in source_callback /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2326:9 10 0xae7adf in do_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2404:15 11 0xae7f48 in do_in_path_and_pp /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2448:12 12 0xae8281 in source_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2496:10 13 0xae610c in source_runtime /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2490:10 14 0x739887 in keymap_init /home/travis/build/neovim/neovim/src/nvim/digraph.c:1755:9 15 0x11d423e in did_set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2678:16 16 0x11eecc4 in set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2409:27 17 0x119852f in set_option_value /home/travis/build/neovim/neovim/src/nvim/option.c:4849:14 18 0x11bccac in set_bool_option /home/travis/build/neovim/neovim/src/nvim/option.c:3984:7 19 0x11a9d50 in do_set /home/travis/build/neovim/neovim/src/nvim/option.c:1424:30 20 0xb8caf7 in ex_set /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:9764:9 21 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5 22 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20 23 0x818b42 in call_user_func /home/travis/build/neovim/neovim/src/nvim/eval.c:21315:3 24 0x7e41bb in call_func /home/travis/build/neovim/neovim/src/nvim/eval.c:6358:11 25 0x7f8fb8 in get_func_tv /home/travis/build/neovim/neovim/src/nvim/eval.c:6120:11 26 0x7f1ba1 in ex_call /home/travis/build/neovim/neovim/src/nvim/eval.c:2735:9 27 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5 28 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20 29 0x837ef1 in ex_execute /home/travis/build/neovim/neovim/src/nvim/eval.c:19463:7 Direct leak of 456 byte(s) in 228 object(s) allocated from: 0 0x4ee3d3 in malloc /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3 1 0xf4e681 in try_malloc /home/travis/build/neovim/neovim/src/nvim/memory.c:87:15 2 0xf4e8a9 in xmalloc /home/travis/build/neovim/neovim/src/nvim/memory.c:121:15 3 0xf4ee68 in xmallocz /home/travis/build/neovim/neovim/src/nvim/memory.c:196:15 4 0x170e3ee in vim_strnsave /home/travis/build/neovim/neovim/src/nvim/strings.c:70:28 5 0x73b18f in ex_loadkeymap /home/travis/build/neovim/neovim/src/nvim/digraph.c:1811:18 6 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5 7 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20 8 0xaee67d in do_source /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2970:3 9 0xae82ae in source_callback /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2326:9 10 0xae7adf in do_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2404:15 11 0xae7f48 in do_in_path_and_pp /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2448:12 12 0xae8281 in source_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2496:10 13 0xae610c in source_runtime /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2490:10 14 0x739887 in keymap_init /home/travis/build/neovim/neovim/src/nvim/digraph.c:1755:9 15 0x11d423e in did_set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2678:16 16 0x11eecc4 in set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2409:27 17 0x119852f in set_option_value /home/travis/build/neovim/neovim/src/nvim/option.c:4849:14 18 0x11bccac in set_bool_option /home/travis/build/neovim/neovim/src/nvim/option.c:3984:7 19 0x11a9d50 in do_set /home/travis/build/neovim/neovim/src/nvim/option.c:1424:30 20 0xb8caf7 in ex_set /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:9764:9 21 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5 22 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20 23 0x818b42 in call_user_func /home/travis/build/neovim/neovim/src/nvim/eval.c:21315:3 24 0x7e41bb in call_func /home/travis/build/neovim/neovim/src/nvim/eval.c:6358:11 25 0x7f8fb8 in get_func_tv /home/travis/build/neovim/neovim/src/nvim/eval.c:6120:11 26 0x7f1ba1 in ex_call /home/travis/build/neovim/neovim/src/nvim/eval.c:2735:9 27 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5 28 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20 29 0x837ef1 in ex_execute /home/travis/build/neovim/neovim/src/nvim/eval.c:19463:7 SUMMARY: AddressSanitizer: 3804 byte(s) leaked in 456 allocation(s). Failed: E /tests/oldtests|logs :: Runtime errors detected.
* Fix for pvs V782, pointer access to first element of arrayPeter Kalauskas2017-11-22
|
* vim-patch:8.0.0062Jurica Bradaric2017-07-25
| | | | | | | Problem: No digraph for HORIZONTAL ELLIPSIS. Solution: Use ",.". (Hans Ginzel, closes vim/vim#1226) https://github.com/vim/vim/commit/81615517249bb78cba9c37c9834b787c1b265521
* *: Add comment to all C filesZyX2017-04-19
|
* digraph: Fix errors due to has_mbyte and friends being fixedZyX2017-04-16
|