aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2018-01-31 04:21:29 +0800
committerJustin M. Keyes <justinkz@gmail.com>2018-01-30 21:21:29 +0100
commit649123d07c13d3314b7f97abdd3d8094b32fbefe (patch)
treea7098840841836cd6f12eb3411899c7d79f6beb0 /src/nvim/edit.c
parent5d2dd2ebe28c31f223d77355a8f9d40adfb41c82 (diff)
downloadrneovim-649123d07c13d3314b7f97abdd3d8094b32fbefe.tar.gz
rneovim-649123d07c13d3314b7f97abdd3d8094b32fbefe.tar.bz2
rneovim-649123d07c13d3314b7f97abdd3d8094b32fbefe.zip
vim-patch:8.0.0358,8.0.0359 (#7832)
vim-patch:8.0.0358: invalid memory access in C-indent code Problem: Invalid memory access in C-indent code. Solution: Don't go over end of empty line. (Dominique Pelle, closes vim/vim#1492) https://github.com/vim/vim/commit/60629d642541a089c322e65963c0a77e5f77eb79 vim-patch:8.0.0359: 'number' and 'relativenumber' are not properly tested Problem: 'number' and 'relativenumber' are not properly tested. Solution: Add tests, change old style to new style tests. (Ozaki Kiichi, closes vim/vim#1447) https://github.com/vim/vim/commit/dc9a081712ec8c140e6d4909e9f6b03a629d32d3
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index c35f7d1858..e67ac7d49f 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -6907,7 +6907,9 @@ bool in_cinkeys(int keytyped, int when, bool line_is_empty)
if (try_match && *look == keytyped) {
return true;
}
- look++;
+ if (*look != NUL) {
+ look++;
+ }
}
/*