aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/digraph.c
Commit message (Collapse)AuthorAge
...
* 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
|
* digraph: Ignore false positiveZyX2017-04-16
| | | | Reversed order is intentional, digraphs allow swapping characters.
* refactor: Remove allow_keys global (#6346)Matthew Malcomson2017-03-25
| | | | | | * The allow_keys global is unused in nvim, remove it * clint
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* Prevent endless loop in printdigraph(). (#5215)oni-link2016-08-11
| | | | | | | | Calling printdiagraph() with msg_silent != 0 can result in an endless loop because the loop condition never changes, if msg_col is never changed. To fix this, calculate the number of iterations before the loop, which is always smaller than list_width.
* vim-patch:7.4.1552James McCoy2016-07-08
| | | | | | | Problem: ":colorscheme" does not use 'packpath'. Solution: Also use in "start" and "opt" directories in 'packpath'. https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
* Remove char_u: ex_docmd:do_cmdline_cmd()Michael Reed2015-05-13
|
* Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | We already use wrappers for allocation, the new `xfree` function is the equivalent for deallocation and provides a way to fully replace the malloc implementation used by Neovim.
* Enable -Wconversion: ui.c.Eliseo Martínez2015-02-18
| | | | | | | | | | | | | | | Refactoring summary: - ui_write(): len: int --> size_t * parse_abstract_ui_codes(): len: int --> size_t * string_convert(): lenp: int * --> size_t * - string_convert_ext(): lenp : int * --> size_t * unconvlenp: int * --> size_t * * utf8len_tab_zero: char[] --> uint8_t[] * iconv_string(): slen : int --> size_t unconvlenp: int * --> size_t * resultlenp: int * --> size_t * - mch_print_text_out(): len: int --> size_t * out_pos: int --> size_t
* Cleanup: Rename getdigits() family functions.Eliseo Martínez2015-01-11
|
* Cleanup: Refactor getdigits().Eliseo Martínez2015-01-11
| | | | | | | | | | | | | | | | Problem : getdigits() currently returns a long, but at most places, return value is casted (unsafely) into an int. Making casts safe would introduce a lot of fuss in the form of assertions checking for limits. Note : We cannot just change return type to int, because, at some places, legitimate long values are used. For example, in diff.c, for line numbers. Solution : Introduce new functions: - get_digits() : Gets an intmax_t from a string. - get_int_digits() : Wrapper for ints. - get_long_digits() : Wrapper for longs. And replace getdigits() invocations by the appropiate wrapper invocations.
* Merge pull request #1497 from splinterofchaos/const-attrJustin M. Keyes2014-11-29
|\ | | | | constify and func-attribute memory.c and strings.c
| * strings: Enable -Wconvert.Scott Prager2014-11-27
| |
* | Wconversion: Change long to int64_t in cursor_shape.c, digraph.c.Florian Walch2014-11-27
| | | | | | | | Warnings were fixed in #1488.
* | ui: Remove redundant ui.h includesThiago de Arruda2014-11-27
| | | | | | | | Also move read_error_exit to os/input.c