mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.1561: using NULL pointers in fold code
Problem: Using NULL pointers in fold code.
Solution: Avoid using a NULL pointer. (Dominique Pellé, closes vim/vim#6831,
closes vim/vim#6831)
81fcb67fb3
This commit is contained in:
parent
22e9aadc88
commit
cc64f2cc1d
@ -2742,7 +2742,8 @@ static void truncate_fold(win_T *const wp, fold_T *fp, linenr_T end)
|
||||
}
|
||||
|
||||
#define FOLD_END(fp) ((fp)->fd_top + (fp)->fd_len - 1)
|
||||
#define VALID_FOLD(fp, gap) ((fp) < ((fold_T *)(gap)->ga_data + (gap)->ga_len))
|
||||
#define VALID_FOLD(fp, gap) \
|
||||
((gap)->ga_len > 0 && (fp) < ((fold_T *)(gap)->ga_data + (gap)->ga_len))
|
||||
#define FOLD_INDEX(fp, gap) ((size_t)(fp - ((fold_T *)(gap)->ga_data)))
|
||||
void foldMoveRange(
|
||||
win_T *const wp, garray_T *gap,
|
||||
|
Loading…
Reference in New Issue
Block a user