aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-01-17 14:17:40 +0100
committerGitHub <noreply@github.com>2023-01-17 21:17:40 +0800
commit0344bfad0fc87d2e256ea2b80de7abd069ba1dd2 (patch)
treee42d0318ed1e684bbb468661d8a1fbfe82e819ee /src/nvim/diff.c
parent99186508d9a1b7536441112f9bbe48690592b5d7 (diff)
downloadrneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.gz
rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.bz2
rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.zip
refactor: replace char_u with char 22 (#21786)
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index 45f00cb41e..40be6b1abc 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -1575,7 +1575,7 @@ static bool extract_hunk(FILE *fd, diffhunk_T *hunk, diffstyle_T *diffstyle)
// --- file1 2018-03-20 13:23:35.783153140 +0100
// +++ file2 2018-03-20 13:23:41.183156066 +0100
// @@ -1,3 +1,5 @@
- if (isdigit(*line)) {
+ if (isdigit((uint8_t)(*line))) {
*diffstyle = DIFF_ED;
} else if ((strncmp(line, "@@ ", 3) == 0)) {
*diffstyle = DIFF_UNIFIED;
@@ -1593,7 +1593,7 @@ static bool extract_hunk(FILE *fd, diffhunk_T *hunk, diffstyle_T *diffstyle)
}
if (*diffstyle == DIFF_ED) {
- if (!isdigit(*line)) {
+ if (!isdigit((uint8_t)(*line))) {
continue; // not the start of a diff block
}
if (parse_diff_ed(line, hunk) == FAIL) {