summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/digraph.c
AgeCommit message (Collapse)AuthorFiles
2026-02-08fix(messages): unwanted newlines with ext_messages #37733luukvbaal1
Problem: Newlines intended to write messages below the cmdline or to mark the start of a new message on message grid are emitted through ext_messages. This results in unnecessary newlines for a UI that has decoupled its message area from the cmdline. msg_col is set directly in some places which is not transmitted to msg_show events. Various missing message kind for list commands. Trailing newlines on various list commands. Solution: Only emit such newlines without ext_messages enabled. Use msg_advance() instead of setting msg_col directly. Assign them the "list_cmd" kind. Ensure no trailing newline is printed.
2025-08-17vim-patch:9.1.1640: Unicode has deprecated some code-points (#35358)zeertzjq1
Problem: Unicode has deprecated some code-points Solution: Update the digraph tables to align with the Unicode v16 release (David Friant) This commit updates the digraphs Left-Pointing Angle Bracket '</' and Right-Pointing Angle Bracket '/>' to account for the fact that the old Unicode codepoints for them (2329 and 232A, respectively) have been deprecated. As per the Miscellaneous Technical code chart (https://www.unicode.org/charts/PDF/U2300.pdf), the old digraphs have been reassigned to the CJK Left Angle Bracket and Right Angle Bracket (3008 and 3009) with their declaration moved to the appropriate block. This commit also introduces the new digraphs '<[' and ']>' to represent the Mathematical Left Angle Bracket and Mathematical Right Angle Bracket (27E8 and 27E9) to replace the deprecated code points in the Technical block. Tests have been added and, I believe, the documentation has been updated accordingly. closes: vim/vim#17990 https://github.com/vim/vim/commit/c08b94b072588d69e0fe76bc93dcd1d8c46be469 Co-authored-by: David Friant <friant@HPEnvyx360.friant.dev>
2025-08-14refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guardsbfredl1
These are not needed after #35129 but making uncrustify still play nice with them was a bit tricky. Unfortunately `uncrustify --update-config-with-doc` breaks strings with backslashes. This issue has been reported upstream, and in the meanwhile auto-update on every single run has been disabled.
2025-07-20vim-patch:8.1.1891: functions used in one file are globalJan Edmund Lazo1
Problem: Functions used in one file are global. Solution: Add "static". (Yegappan Lakshmanan, closes vim/vim#4840) https://github.com/vim/vim/commit/5843f5f37b0632e2d706abc9014bfd7d98f7b02e Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-02-02vim-patch:9.1.1065: no digraph for "Approaches the limit" (#32289)zeertzjq1
Problem: no digraph for "Approaches the limit" Solution: Add the digraph using .= (Hans Ginzel) Add digraph Approaches the Limit ≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm closes: vim/vim#16508 https://github.com/vim/vim/commit/3a621188ee52badfe7aa783db12588a78dcd8ed6 Co-authored-by: Hans Ginzel <hans@matfyz.cz>
2025-01-09vim-patch:9.1.0997: too many strlen() calls in drawscreen.c (#31927)zeertzjq1
Problem: too many strlen() calls in drawscreen.c Solution: refactor drawscreen.c and remove calls to strlen(), make get_keymap_str() (in screen.c) return string length instead of TRUE/FALSE (John Marriott). https://github.com/vim/vim/commit/a21240b97debea2e087aee6ad1488b5f075d1259 Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-01-03fix(messages): better formatting for ext_messages #31839luukvbaal1
Problem: Message grid newline formatting based on `msg_col` is not utilized with ext_messages. Solution: Increment `msg_col` with the cell width of the chunk. Allowing message code that uses `msg_col` to determine when to place a newline to do so. E.g. when the message goes beyond `Columns`; this is not necessarily where the ext_messages implementation would want to place a newline, but it is a best guess. Message parsing and manipulation is still possible.
2024-12-23refactor: iwyu #31637Justin M. Keyes1
Result of `make iwyu` (after some "fixups").
2024-12-03vim-patch:9.1.0900: Vim9: digraph_getlist() does not accept bool arg (#31431)zeertzjq1
Problem: Vim9: digraph_getlist() does not accept bool argument (Maxim Kim) Solution: accept boolean as first argument (Yegappan Lakshmanan) fixes: vim/vim#16154 closes: vim/vim#16159 https://github.com/vim/vim/commit/198ada3d9f48c6556d20c4115ec500555b118aad Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-11-13refactor(highlight): make enum of builtin highlights start with 1bfredl1
This makes it possible to use HLF_ values directly as highlight id:s and avoids +1 adjustments especially around messages.
2024-11-08refactor(message): propagate highlight id instead of attrsLuuk van Baal1
Problem: Highlight group id is not propagated to the end of the message call stack, where ext_messages are emitted. Solution: Refactor message functions to pass along highlight group id instead of attr id.
2024-08-30feat(mbyte): support extended grapheme clusters including more emojibfredl1
Use the grapheme break algorithm from utf8proc to support grapheme clusters from recent unicode versions. Handle variant selector VS16 turning some codepoints into double-width emoji. This means we need to use ptr2cells rather than char2cells when possible.
2024-08-02vim-patch:9.0.0634: evaluating "expr" options has more overhead than neededzeertzjq1
Problem: Evaluating "expr" options has more overhead than needed. Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr', "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr', 'formatexpr', 'indentexpr' and 'charconvert'. https://github.com/vim/vim/commit/a4e0b9785e409e9e660171cea76dfcc5fdafad9b vim-patch:9.0.0635: build error and compiler warnings Problem: Build error and compiler warnings. Solution: Add missing change. Add type casts. https://github.com/vim/vim/commit/3292a229402c9892f5ab90645fbfe2b1db342f5b Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-06-01refactor: move shared messages to errors.h #26214Justin M. Keyes1
2024-04-13vim-patch:9.0.2180: POSIX function name in exarg causes issues (#28308)zeertzjq1
Problem: POSIX function name in exarg struct causes issues on OpenVMS Solution: Rename getline member in exarg struct to ea_getline, remove isinf() workaround for VMS There are compilers that do not treat well POSIX functions - like getline - usage in the structs. Older VMS compilers could digest this... but the newer OpenVMS compilers ( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these structs. This could be limited to getline() that is defined via getdelim() and might not affect all POSIX functions in general - but avoiding POSIX function names usage in the structs is a "safe side" practice without compromising the functionality or the code readability. The previous OpenVMS X86 port used a workaround limiting the compiler capabilities using __CRTL_VER_OVERRIDE=80400000 In order to make the OpenVMS port future proof, this pull request proposes a possible solution. closes: vim/vim#13704 https://github.com/vim/vim/commit/6fdb6280821a822768df5689a5d727e37d38306c Co-authored-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
2024-01-11refactor(IWYU): fix headersdundargoc1
Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
2024-01-02refactor: remove redundant struct namesdundargoc1
A struct can be anonymous if only its typedef is used.
2023-12-30refactor: follow style guidedundargoc1
2023-11-30build: don't define FUNC_ATTR_* as empty in headers (#26317)zeertzjq1
FUNC_ATTR_* should only be used in .c files with generated headers. Defining FUNC_ATTR_* as empty in headers causes misuses of them to be silently ignored. Instead don't define them by default, and only define them as empty after a .c file has included its generated header.
2023-11-29refactor: move some constants out of vim_defs.h (#26298)zeertzjq1
2023-11-28refactor: fix headers with IWYUdundargoc1
2023-11-27refactor: rename types.h to types_defs.hdundargoc1
2023-11-27build(IWYU): fix includes for func_attr.hdundargoc1
2023-11-17refactor(grid): make screen rendering more multibyte than ever beforebfredl1
Problem: buffer text with composing chars are converted from UTF-8 to an array of up to seven UTF-32 values and then converted back to UTF-8 strings. Solution: Convert buffer text directly to UTF-8 based schar_T values. The limit of the text size is now in schar_T bytes, which is currently 31+1 but easily could be raised as it no longer multiplies the size of the entire screen grid when not used, the full size is only required for temporary scratch buffers. Also does some general cleanup to win_line text handling, which was unnecessarily complicated due to multibyte rendering being an "opt-in" feature long ago. Nowadays, a char is just a char, regardless if it consists of one ASCII byte or multiple bytes.
2023-11-13refactor: follow style guidedundargoc1
- reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
2023-11-12build: remove PVSdundargoc1
We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
2023-11-10refactor: change some xstrndup() and xstrnsave() to xmemdupz() (#25959)zeertzjq1
When the given length is exactly the number of bytes to copy, xmemdupz() makes the intention clearer.
2023-10-20vim-patch:9.0.2056: no digraph for quadruple primeChristian Clason1
Problem: no digraph for quadruple prime Solution: add quadruple prime digraph using 4' closes: vim/vim#13380 https://github.com/vim/vim/commit/47416d1a7441f8c815438903e78ba0a2d877699e Co-authored-by: Jonathan Wright <quaggy@gmail.com>
2023-09-30refactor: reorganize option header files (#25437)zeertzjq1
- Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other
2023-09-30build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq1
2023-09-27refactor(messages): fold msg_outtrans_attr into msg_outtransbfredl1
problem: there are too many different functions in message.c solution: fold some of the functions into themselves
2023-04-26refactor: uncrustifydundargoc1
Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
2023-04-14vim-patch:8.2.1049: Vim9: leaking memory when using continuation linezeertzjq1
Problem: Vim9: leaking memory when using continuation line. Solution: Keep a pointer to the continuation line in evalarg_T. Centralize checking for a next command. https://github.com/vim/vim/commit/b171fb179053fa631fec74911b5fb9374cb6a8a1 Omit eval_next_line(): Vim9 script only. vim-patch:8.2.1050: missing change in struct Problem: Missing change in struct. Solution: Add missing change. https://github.com/vim/vim/commit/65a8ed37f7bc61fbe5c612a7b0eb0dfc16ad3e11 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-05refactor: make error message definitions constii141
message.c functions now take const char * as a format. Error message definitions can be made const.
2023-03-14refactor(screen): screen.c delenda estbfredl1
drawscreen.c vs screen.c makes absolutely no sense. The screen exists only to draw upon it, therefore helper functions are distributed randomly between screen.c and the file that does the redrawing. In addition screen.c does a lot of drawing on the screen. It made more sense for vim/vim as our grid.c is their screen.c Not sure if we want to dump all the code for option chars into optionstr.c, so keep these in a optionchar.c for now.
2023-03-04refactor: replace char_u with char or uint8_t (#22400)dundargoc1
Work on https://github.com/neovim/neovim/issues/459
2023-01-18refactor: replace char_u with char 24 (#21823)dundargoc1
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2023-01-17refactor: replace char_u with char 22 (#21786)dundargoc1
Work on https://github.com/neovim/neovim/issues/459
2023-01-14refactor: replace char_u with char 21 (#21779)dundargoc1
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2023-01-13refactor: replace char_u with char 20 (#21714)dundargoc1
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2023-01-10vim-patch:partial:9.0.1166: code is indented more than necessary (#21716)zeertzjq1
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11792) https://github.com/vim/vim/commit/1cfb14aa972ccf3235ac67f07b7db1175b7c5384 Partial port as some highlight.c changes depend on previous patches. Cherry-pick fname_match() change from patch 8.2.4959. Omit internal_func_check_arg_types(): only used for Vim9 script. N/A patches for version.c: vim-patch:9.0.1167: EditorConfig files do not have their own filetype Problem: EditorConfig files do not have their own filetype. Solution: Add the "editorconfig" filetype. (Gregory Anders, closes vim/vim#11779) https://github.com/vim/vim/commit/d41262ed06564cef98a3800e2928e6e0db91abbf Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-26vim-patch:9.0.1098: code uses too much indent (#21540)zeertzjq1
Problem: Code uses too much indent. Solution: Use an early return. (Yegappan Lakshmanan, closes vim/vim#11747) https://github.com/vim/vim/commit/465de3a57b815f1188c707e7c083950c81652536 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-15build: allow IWYU to fix includes for all .c filesdundargoc1
Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
2022-11-01build(lint): remove clint.py rules for braces #20880dundargoc1
Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. See also https://github.com/neovim/neovim/pull/18563
2022-09-25vim-patch:9.0.0576: unused loop variables (#20326)dundargoc1
Problem: Unused loop variables. Solution: Use a while loop instead. (closes vim/vim#11214) https://github.com/vim/vim/commit/b2209f213e2931cf3313b24868a9165bbb717cc4
2022-09-11refactor: replace char_u with charDundar Göc1
Work on https://github.com/neovim/neovim/issues/459
2022-09-06refactor: replace char_u with charDundar Göc1
Work on https://github.com/neovim/neovim/issues/459
2022-09-01refactor: replace char_u with charDundar Göc1
Work on https://github.com/neovim/neovim/issues/459
2022-08-30refactor: replace char_u with char 4 (#19987)dundargoc1
* refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2022-08-23perf(api): allow to use an arena for return valuesbfredl1