mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.2331: the option.c file is still very big
Problem: The option.c file is still very big. Solution: Move a few functions to where they fit better. (Yegappan Lakshmanan, closes #4895)
This commit is contained in:
44
src/indent.c
44
src/indent.c
@@ -838,6 +838,50 @@ get_number_indent(linenr_T lnum)
|
||||
}
|
||||
|
||||
#if defined(FEAT_LINEBREAK) || defined(PROTO)
|
||||
/*
|
||||
* This is called when 'breakindentopt' is changed and when a window is
|
||||
* initialized.
|
||||
*/
|
||||
int
|
||||
briopt_check(win_T *wp)
|
||||
{
|
||||
char_u *p;
|
||||
int bri_shift = 0;
|
||||
long bri_min = 20;
|
||||
int bri_sbr = FALSE;
|
||||
|
||||
p = wp->w_p_briopt;
|
||||
while (*p != NUL)
|
||||
{
|
||||
if (STRNCMP(p, "shift:", 6) == 0
|
||||
&& ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6])))
|
||||
{
|
||||
p += 6;
|
||||
bri_shift = getdigits(&p);
|
||||
}
|
||||
else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4]))
|
||||
{
|
||||
p += 4;
|
||||
bri_min = getdigits(&p);
|
||||
}
|
||||
else if (STRNCMP(p, "sbr", 3) == 0)
|
||||
{
|
||||
p += 3;
|
||||
bri_sbr = TRUE;
|
||||
}
|
||||
if (*p != ',' && *p != NUL)
|
||||
return FAIL;
|
||||
if (*p == ',')
|
||||
++p;
|
||||
}
|
||||
|
||||
wp->w_p_brishift = bri_shift;
|
||||
wp->w_p_brimin = bri_min;
|
||||
wp->w_p_brisbr = bri_sbr;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return appropriate space number for breakindent, taking influencing
|
||||
* parameters into account. Window must be specified, since it is not
|
||||
|
Reference in New Issue
Block a user