diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-01-30 14:39:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-30 14:39:13 +0800 |
commit | efa664c7ed21b63f2cf0a8caa53161fe7e32b2bb (patch) | |
tree | 5823bfb8aadf263a079818a96480dfd35f5d0685 /src/nvim/ascii_defs.h | |
parent | 35c5e231078365033524b0aa2166118a1b2ef600 (diff) | |
download | rneovim-efa664c7ed21b63f2cf0a8caa53161fe7e32b2bb.tar.gz rneovim-efa664c7ed21b63f2cf0a8caa53161fe7e32b2bb.tar.bz2 rneovim-efa664c7ed21b63f2cf0a8caa53161fe7e32b2bb.zip |
vim-patch:9.1.1056: Vim doesn't highlight to be inserted text when completing (#32251)
Problem: Vim doesn't highlight to be inserted text when completing
Solution: Add support for the "preinsert" 'completeopt' value
(glepnir)
Support automatically inserting the currently selected candidate word
that does not belong to the latter part of the leader.
fixes: vim/vim#3433
closes: vim/vim#16403
https://github.com/vim/vim/commit/edd4ac3e895ce16034c7e098f1d68e0155d97886
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'src/nvim/ascii_defs.h')
-rw-r--r-- | src/nvim/ascii_defs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/ascii_defs.h b/src/nvim/ascii_defs.h index 155a18fb95..86187b553c 100644 --- a/src/nvim/ascii_defs.h +++ b/src/nvim/ascii_defs.h @@ -103,6 +103,15 @@ static inline bool ascii_iswhite_or_nul(int c) return ascii_iswhite(c) || c == NUL; } +/// Checks if `c` is a space or tab or newline character or NUL. +/// +/// @see {ascii_isdigit} +static inline bool ascii_iswhite_nl_or_nul(int c) + FUNC_ATTR_CONST FUNC_ATTR_ALWAYS_INLINE +{ + return ascii_iswhite(c) || c == '\n' || c == NUL; +} + /// Check whether character is a decimal digit. /// /// Library isdigit() function is officially locale-dependent and, for |