addressing reviews
This commit is contained in:
parent
1a2be57da3
commit
4ffae76520
|
@ -4483,7 +4483,7 @@ prepare_tagpreview (
|
||||||
RESET_BINDING(curwin); /* don't take over 'scrollbind'
|
RESET_BINDING(curwin); /* don't take over 'scrollbind'
|
||||||
and 'cursorbind' */
|
and 'cursorbind' */
|
||||||
curwin->w_p_diff = false; // no 'diff'
|
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);
|
(char_u *)"0", OPT_FREE, SID_NONE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2325,7 +2325,6 @@ void check_buf_options(buf_T *buf)
|
||||||
* Does NOT check for P_ALLOCED flag!
|
* Does NOT check for P_ALLOCED flag!
|
||||||
*/
|
*/
|
||||||
void free_string_option(char_u *p)
|
void free_string_option(char_u *p)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (p != empty_option) {
|
if (p != empty_option) {
|
||||||
xfree(p);
|
xfree(p);
|
||||||
|
|
|
@ -694,18 +694,15 @@ void win_check_anchored_floats(win_T *win)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return the number of requested fold columns, based on current
|
/// Return the number of fold columns to display
|
||||||
/// folds signs and on user configuration.
|
|
||||||
int win_fdccol_count(win_T *wp)
|
int win_fdccol_count(win_T *wp)
|
||||||
{
|
{
|
||||||
const char *fdc = (const char *)wp->w_p_fdc;
|
const char *fdc = (const char *)wp->w_p_fdc;
|
||||||
|
|
||||||
// auto:<NUM>
|
// auto:<NUM>
|
||||||
if (strncmp(fdc, "auto:", 5) == 0) {
|
if (strncmp(fdc, "auto:", 5) == 0) {
|
||||||
int needed_fdccols;
|
int needed_fdccols = getDeepestNesting(wp);
|
||||||
needed_fdccols = getDeepestNesting(wp);
|
return MIN(fdc[5] - '0', needed_fdccols);
|
||||||
int maximum = fdc[5] - '0';
|
|
||||||
return MIN(maximum, needed_fdccols);
|
|
||||||
} else {
|
} else {
|
||||||
return fdc[0] - '0';
|
return fdc[0] - '0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue