diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-05 07:12:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 07:12:02 +0800 |
commit | ae64772a88125153a438a0e9e43d5f6bcb4eeb28 (patch) | |
tree | 2c086cc06b2aa63549b5bd45716e3ee74a027bf4 /src/nvim/diff.c | |
parent | 89232b8b4890824f93121483626af582f13758fe (diff) | |
download | rneovim-ae64772a88125153a438a0e9e43d5f6bcb4eeb28.tar.gz rneovim-ae64772a88125153a438a0e9e43d5f6bcb4eeb28.tar.bz2 rneovim-ae64772a88125153a438a0e9e43d5f6bcb4eeb28.zip |
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.
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |