aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-14 05:03:49 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-04-14 05:06:50 +0800
commite81fe387d6291e5643a97a61e6d05b48aaeab2a1 (patch)
treeff7a5e6193170512cbbe385866239d901dc5ac40 /src/nvim/charset.c
parent617a3851426434bc22d82fe7574ba8f0455c0dcd (diff)
downloadrneovim-e81fe387d6291e5643a97a61e6d05b48aaeab2a1.tar.gz
rneovim-e81fe387d6291e5643a97a61e6d05b48aaeab2a1.tar.bz2
rneovim-e81fe387d6291e5643a97a61e6d05b48aaeab2a1.zip
vim-patch:9.1.0313: Crash when using heredoc with comment in command block
Problem: Crash when using heredoc with comment in command block. Solution: Handle a newline more like the end of the line, fix coverity warning (zeertzjq). closes: vim/vim#14535 https://github.com/vim/vim/commit/1f5175d9af3d3f37e19f23e0e6f84caec47390f2
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index 59932b2eb0..c611d4cfd6 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1045,20 +1045,6 @@ char *skiptowhite(const char *p)
return (char *)p;
}
-/// Skip over text until ' ' or '\t' or newline or NUL
-///
-/// @param[in] p Text to skip over.
-///
-/// @return Pointer to the next whitespace or newline or NUL character.
-char *skiptowhite_or_nl(const char *p)
- FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE
-{
- while (*p != ' ' && *p != '\t' && *p != NL && *p != NUL) {
- p++;
- }
- return (char *)p;
-}
-
/// skiptowhite_esc: Like skiptowhite(), but also skip escaped chars
///
/// @param p