comparison src/fold.c @ 27752:c1d1639b52dd v8.2.4402

patch 8.2.4402: missing parenthesis may cause unexpected problems Commit: https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83 Author: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Wed Feb 16 19:24:07 2022 +0000 patch 8.2.4402: missing parenthesis may cause unexpected problems Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. (closes https://github.com/vim/vim/issues/9788)
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Feb 2022 20:30:03 +0100
parents 51a28e8be7c3
children 8cba27db759a
comparison
equal deleted inserted replaced
27751:c9330d10419b 27752:c1d1639b52dd
3064 fp->fd_len = end - fp->fd_top; 3064 fp->fd_len = end - fp->fd_top;
3065 } 3065 }
3066 3066
3067 #define fold_end(fp) ((fp)->fd_top + (fp)->fd_len - 1) 3067 #define fold_end(fp) ((fp)->fd_top + (fp)->fd_len - 1)
3068 #define valid_fold(fp, gap) ((gap)->ga_len > 0 && (fp) < ((fold_T *)(gap)->ga_data + (gap)->ga_len)) 3068 #define valid_fold(fp, gap) ((gap)->ga_len > 0 && (fp) < ((fold_T *)(gap)->ga_data + (gap)->ga_len))
3069 #define fold_index(fp, gap) ((size_t)(fp - ((fold_T *)(gap)->ga_data))) 3069 #define fold_index(fp, gap) ((size_t)((fp) - ((fold_T *)(gap)->ga_data)))
3070 3070
3071 void 3071 void
3072 foldMoveRange(garray_T *gap, linenr_T line1, linenr_T line2, linenr_T dest) 3072 foldMoveRange(garray_T *gap, linenr_T line1, linenr_T line2, linenr_T dest)
3073 { 3073 {
3074 fold_T *fp; 3074 fold_T *fp;