addressing reviews

This commit is contained in:
Matthieu Coudron 2020-03-01 16:43:06 +01:00
parent 1a2be57da3
commit 4ffae76520
3 changed files with 4 additions and 8 deletions

View File

@ -4483,7 +4483,7 @@ prepare_tagpreview (
RESET_BINDING(curwin); /* don't take over 'scrollbind'
and 'cursorbind' */
curwin->w_p_diff = false; // no 'diff'
set_string_option_direct((char_u *)"fdc", -1,
set_string_option_direct((char_u *)"fdc", -1, // no 'foldcolumn'
(char_u *)"0", OPT_FREE, SID_NONE);
return true;
}

View File

@ -2325,7 +2325,6 @@ void check_buf_options(buf_T *buf)
* Does NOT check for P_ALLOCED flag!
*/
void free_string_option(char_u *p)
{
if (p != empty_option) {
xfree(p);

View File

@ -694,18 +694,15 @@ void win_check_anchored_floats(win_T *win)
}
}
/// Return the number of requested fold columns, based on current
/// folds signs and on user configuration.
/// Return the number of fold columns to display
int win_fdccol_count(win_T *wp)
{
const char *fdc = (const char *)wp->w_p_fdc;
// auto:<NUM>
if (strncmp(fdc, "auto:", 5) == 0) {
int needed_fdccols;
needed_fdccols = getDeepestNesting(wp);
int maximum = fdc[5] - '0';
return MIN(maximum, needed_fdccols);
int needed_fdccols = getDeepestNesting(wp);
return MIN(fdc[5] - '0', needed_fdccols);
} else {
return fdc[0] - '0';
}