From ae64772a88125153a438a0e9e43d5f6bcb4eeb28 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 5 Jan 2023 07:12:02 +0800 Subject: fix(diff): avoid restoring invalid 'foldcolumn' value (#21650) Use "0" for 'foldcolumn' when w_p_fdc_save is empty, like how "manual" is used for 'foldmethod' when w_p_fdm_save is empty. --- src/nvim/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/diff.c') diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 267ec16d72..f9a456a7b2 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -1502,7 +1502,7 @@ void ex_diffoff(exarg_T *eap) free_string_option(wp->w_p_fdm); wp->w_p_fdm = xstrdup(*wp->w_p_fdm_save ? wp->w_p_fdm_save : "manual"); free_string_option(wp->w_p_fdc); - wp->w_p_fdc = xstrdup(wp->w_p_fdc_save); + wp->w_p_fdc = xstrdup(*wp->w_p_fdc_save ? wp->w_p_fdc_save : "0"); if (wp->w_p_fdl == 0) { wp->w_p_fdl = wp->w_p_fdl_save; -- cgit