From 249591057b4840785c50e41dd850efb8a8faf435 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 7 May 2022 20:01:16 +0100 Subject: patch 8.2.4911: the mode #defines are not clearly named Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. --- src/fold.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fold.c') diff --git a/src/fold.c b/src/fold.c index 229cb2ad2d..f94b38949b 100644 --- a/src/fold.c +++ b/src/fold.c @@ -1499,7 +1499,7 @@ foldMarkAdjust( line2 = line1 - amount_after - 1; // If appending a line in Insert mode, it should be included in the fold // just above the line. - if ((State & INSERT) && amount == (linenr_T)1 && line2 == MAXLNUM) + if ((State & MODE_INSERT) && amount == (linenr_T)1 && line2 == MAXLNUM) --line1; foldMarkAdjustRecurse(&wp->w_folds, line1, line2, amount, amount_after); } @@ -1523,7 +1523,7 @@ foldMarkAdjustRecurse( // In Insert mode an inserted line at the top of a fold is considered part // of the fold, otherwise it isn't. - if ((State & INSERT) && amount == (linenr_T)1 && line2 == MAXLNUM) + if ((State & MODE_INSERT) && amount == (linenr_T)1 && line2 == MAXLNUM) top = line1 + 1; else top = line1; -- cgit v1.2.3