mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0880: preprocessor indenting is off
Problem: Preprocessor indenting is off. Solution: Adjust preprocessor indentation. (Ken Takata, closes #11546)
This commit is contained in:
parent
dcbdd82d05
commit
161b6ac04f
@ -4145,11 +4145,11 @@ in_cinkeys(
|
|||||||
void
|
void
|
||||||
do_c_expr_indent(void)
|
do_c_expr_indent(void)
|
||||||
{
|
{
|
||||||
# ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
if (*curbuf->b_p_inde != NUL)
|
if (*curbuf->b_p_inde != NUL)
|
||||||
fixthisline(get_expr_indent);
|
fixthisline(get_expr_indent);
|
||||||
else
|
else
|
||||||
# endif
|
#endif
|
||||||
fixthisline(get_c_indent);
|
fixthisline(get_c_indent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2756,7 +2756,7 @@ get_behave_arg(expand_T *xp UNUSED, int idx)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
/*
|
/*
|
||||||
* Function given to ExpandGeneric() to obtain the possible arguments of the
|
* Function given to ExpandGeneric() to obtain the possible arguments of the
|
||||||
* ":breakadd {expr, file, func, here}" command.
|
* ":breakadd {expr, file, func, here}" command.
|
||||||
@ -3020,10 +3020,10 @@ ExpandFromContext(
|
|||||||
char *directories[] = {"syntax", "indent", "ftplugin", NULL};
|
char *directories[] = {"syntax", "indent", "ftplugin", NULL};
|
||||||
return ExpandRTDir(pat, 0, numMatches, matches, directories);
|
return ExpandRTDir(pat, 0, numMatches, matches, directories);
|
||||||
}
|
}
|
||||||
# if defined(FEAT_EVAL)
|
#if defined(FEAT_EVAL)
|
||||||
if (xp->xp_context == EXPAND_USER_LIST)
|
if (xp->xp_context == EXPAND_USER_LIST)
|
||||||
return ExpandUserList(xp, matches, numMatches);
|
return ExpandUserList(xp, matches, numMatches);
|
||||||
# endif
|
#endif
|
||||||
if (xp->xp_context == EXPAND_PACKADD)
|
if (xp->xp_context == EXPAND_PACKADD)
|
||||||
return ExpandPackAddDir(pat, numMatches, matches);
|
return ExpandPackAddDir(pat, numMatches, matches);
|
||||||
|
|
||||||
@ -3057,10 +3057,10 @@ ExpandFromContext(
|
|||||||
ret = ExpandSettings(xp, ®match, pat, numMatches, matches, fuzzy);
|
ret = ExpandSettings(xp, ®match, pat, numMatches, matches, fuzzy);
|
||||||
else if (xp->xp_context == EXPAND_MAPPINGS)
|
else if (xp->xp_context == EXPAND_MAPPINGS)
|
||||||
ret = ExpandMappings(pat, ®match, numMatches, matches);
|
ret = ExpandMappings(pat, ®match, numMatches, matches);
|
||||||
# if defined(FEAT_EVAL)
|
#if defined(FEAT_EVAL)
|
||||||
else if (xp->xp_context == EXPAND_USER_DEFINED)
|
else if (xp->xp_context == EXPAND_USER_DEFINED)
|
||||||
ret = ExpandUserDefined(pat, xp, ®match, matches, numMatches);
|
ret = ExpandUserDefined(pat, xp, ®match, matches, numMatches);
|
||||||
# endif
|
#endif
|
||||||
else
|
else
|
||||||
ret = ExpandOther(pat, xp, ®match, matches, numMatches);
|
ret = ExpandOther(pat, xp, ®match, matches, numMatches);
|
||||||
|
|
||||||
@ -3168,7 +3168,7 @@ ExpandGeneric(
|
|||||||
else
|
else
|
||||||
((char_u **)ga.ga_data)[ga.ga_len] = str;
|
((char_u **)ga.ga_data)[ga.ga_len] = str;
|
||||||
|
|
||||||
# ifdef FEAT_MENU
|
#ifdef FEAT_MENU
|
||||||
if (func == get_menu_names)
|
if (func == get_menu_names)
|
||||||
{
|
{
|
||||||
// test for separator added by get_menu_names()
|
// test for separator added by get_menu_names()
|
||||||
@ -3176,7 +3176,7 @@ ExpandGeneric(
|
|||||||
if (*str == '\001')
|
if (*str == '\001')
|
||||||
*str = '.';
|
*str = '.';
|
||||||
}
|
}
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
++ga.ga_len;
|
++ga.ga_len;
|
||||||
}
|
}
|
||||||
@ -3350,11 +3350,11 @@ expand_shellcmd(
|
|||||||
hash_init(&found_ht);
|
hash_init(&found_ht);
|
||||||
for (s = path; ; s = e)
|
for (s = path; ; s = e)
|
||||||
{
|
{
|
||||||
# if defined(MSWIN)
|
#if defined(MSWIN)
|
||||||
e = vim_strchr(s, ';');
|
e = vim_strchr(s, ';');
|
||||||
# else
|
#else
|
||||||
e = vim_strchr(s, ':');
|
e = vim_strchr(s, ':');
|
||||||
# endif
|
#endif
|
||||||
if (e == NULL)
|
if (e == NULL)
|
||||||
e = s + STRLEN(s);
|
e = s + STRLEN(s);
|
||||||
|
|
||||||
@ -3396,7 +3396,7 @@ expand_shellcmd(
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
# if defined(FEAT_EVAL)
|
#if defined(FEAT_EVAL)
|
||||||
/*
|
/*
|
||||||
* Call "user_expand_func()" to invoke a user defined Vim script function and
|
* Call "user_expand_func()" to invoke a user defined Vim script function and
|
||||||
* return the result (either a string, a List or NULL).
|
* return the result (either a string, a List or NULL).
|
||||||
@ -3580,7 +3580,7 @@ ExpandUserList(
|
|||||||
*numMatches = ga.ga_len;
|
*numMatches = ga.ga_len;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expand "file" for all comma-separated directories in "path".
|
* Expand "file" for all comma-separated directories in "path".
|
||||||
@ -3613,14 +3613,14 @@ globpath(
|
|||||||
copy_option_part(&path, buf, MAXPATHL, ",");
|
copy_option_part(&path, buf, MAXPATHL, ",");
|
||||||
if (STRLEN(buf) + STRLEN(file) + 2 < MAXPATHL)
|
if (STRLEN(buf) + STRLEN(file) + 2 < MAXPATHL)
|
||||||
{
|
{
|
||||||
# if defined(MSWIN)
|
#if defined(MSWIN)
|
||||||
// Using the platform's path separator (\) makes vim incorrectly
|
// Using the platform's path separator (\) makes vim incorrectly
|
||||||
// treat it as an escape character, use '/' instead.
|
// treat it as an escape character, use '/' instead.
|
||||||
if (*buf != NUL && !after_pathsep(buf, buf + STRLEN(buf)))
|
if (*buf != NUL && !after_pathsep(buf, buf + STRLEN(buf)))
|
||||||
STRCAT(buf, "/");
|
STRCAT(buf, "/");
|
||||||
# else
|
#else
|
||||||
add_pathsep(buf);
|
add_pathsep(buf);
|
||||||
# endif
|
#endif
|
||||||
STRCAT(buf, file);
|
STRCAT(buf, file);
|
||||||
if (ExpandFromContext(&xpc, buf, &p, &num_p,
|
if (ExpandFromContext(&xpc, buf, &p, &num_p,
|
||||||
WILD_SILENT|expand_options) != FAIL && num_p > 0)
|
WILD_SILENT|expand_options) != FAIL && num_p > 0)
|
||||||
@ -3828,10 +3828,10 @@ wildmenu_process_key_filenames(cmdline_info_T *cclp, int key, expand_T *xp)
|
|||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
j -= (*mb_head_off)(cclp->cmdbuff, cclp->cmdbuff + j);
|
j -= (*mb_head_off)(cclp->cmdbuff, cclp->cmdbuff + j);
|
||||||
if (vim_ispathsep(cclp->cmdbuff[j])
|
if (vim_ispathsep(cclp->cmdbuff[j])
|
||||||
# ifdef BACKSLASH_IN_FILENAME
|
#ifdef BACKSLASH_IN_FILENAME
|
||||||
&& vim_strchr((char_u *)" *?[{`$%#",
|
&& vim_strchr((char_u *)" *?[{`$%#",
|
||||||
cclp->cmdbuff[j + 1]) == NULL
|
cclp->cmdbuff[j + 1]) == NULL
|
||||||
# endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (found)
|
if (found)
|
||||||
|
@ -230,10 +230,10 @@ gui_do_fork(void)
|
|||||||
int exit_status;
|
int exit_status;
|
||||||
pid_t pid = -1;
|
pid_t pid = -1;
|
||||||
|
|
||||||
#if defined(FEAT_RELTIME) && defined(HAVE_TIMER_CREATE)
|
# if defined(FEAT_RELTIME) && defined(HAVE_TIMER_CREATE)
|
||||||
// a timer is not carried forward
|
// a timer is not carried forward
|
||||||
delete_timer();
|
delete_timer();
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
// Setup a pipe between the child and the parent, so that the parent
|
// Setup a pipe between the child and the parent, so that the parent
|
||||||
// knows when the child has done the setsid() call and is allowed to
|
// knows when the child has done the setsid() call and is allowed to
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
|
|
||||||
// Suppress Infinite warnings when compiling XS modules under macOS 12 Monterey.
|
// Suppress Infinite warnings when compiling XS modules under macOS 12 Monterey.
|
||||||
#if defined(__clang__) && defined(__clang_major__) && __clang_major__ > 11
|
#if defined(__clang__) && defined(__clang_major__) && __clang_major__ > 11
|
||||||
#pragma clang diagnostic ignored "-Wcompound-token-split-by-macro"
|
# pragma clang diagnostic ignored "-Wcompound-token-split-by-macro"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compatibility hacks over */
|
/* Compatibility hacks over */
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
// Suppress Python 3.11 depreciations to see useful warnings
|
// Suppress Python 3.11 depreciations to see useful warnings
|
||||||
#if defined(__clang__) && defined(__clang_major__) && __clang_major__ > 11
|
#if defined(__clang__) && defined(__clang_major__) && __clang_major__ > 11
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Python 3 does not support CObjects, always use Capsules
|
// Python 3 does not support CObjects, always use Capsules
|
||||||
|
@ -1262,7 +1262,7 @@ decode_mouse_wheel(MOUSE_EVENT_RECORD *pmer)
|
|||||||
g_xMouse = pmer->dwMousePosition.X;
|
g_xMouse = pmer->dwMousePosition.X;
|
||||||
g_yMouse = pmer->dwMousePosition.Y;
|
g_yMouse = pmer->dwMousePosition.Y;
|
||||||
|
|
||||||
#ifdef FEAT_PROP_POPUP
|
# ifdef FEAT_PROP_POPUP
|
||||||
int lcol = g_xMouse;
|
int lcol = g_xMouse;
|
||||||
int lrow = g_yMouse;
|
int lrow = g_yMouse;
|
||||||
win_T *wp = mouse_find_win(&lrow, &lcol, FIND_POPUP);
|
win_T *wp = mouse_find_win(&lrow, &lcol, FIND_POPUP);
|
||||||
@ -1294,7 +1294,7 @@ decode_mouse_wheel(MOUSE_EVENT_RECORD *pmer)
|
|||||||
out_flush();
|
out_flush();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
mouse_col = g_xMouse;
|
mouse_col = g_xMouse;
|
||||||
mouse_row = g_yMouse;
|
mouse_row = g_yMouse;
|
||||||
|
|
||||||
@ -6059,9 +6059,9 @@ insert_lines(unsigned cLines)
|
|||||||
|
|
||||||
fill.Char.AsciiChar = ' ';
|
fill.Char.AsciiChar = ' ';
|
||||||
if (!(vtp_working
|
if (!(vtp_working
|
||||||
#ifdef FEAT_TERMGUICOLORS
|
# ifdef FEAT_TERMGUICOLORS
|
||||||
&& (p_tgc || t_colors >= 256)
|
&& (p_tgc || t_colors >= 256)
|
||||||
#endif
|
# endif
|
||||||
))
|
))
|
||||||
fill.Attributes = g_attrCurrent;
|
fill.Attributes = g_attrCurrent;
|
||||||
else
|
else
|
||||||
@ -6187,9 +6187,9 @@ gotoxy(
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(vtp_working
|
if (!(vtp_working
|
||||||
#ifdef FEAT_TERMGUICOLORS
|
# ifdef FEAT_TERMGUICOLORS
|
||||||
&& (p_tgc || t_colors >= 256)
|
&& (p_tgc || t_colors >= 256)
|
||||||
#endif
|
# endif
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
// There are reports of double-width characters not displayed
|
// There are reports of double-width characters not displayed
|
||||||
@ -6435,9 +6435,9 @@ write_chars(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(vtp_working
|
if (!(vtp_working
|
||||||
#ifdef FEAT_TERMGUICOLORS
|
# ifdef FEAT_TERMGUICOLORS
|
||||||
&& (p_tgc || t_colors >= 256)
|
&& (p_tgc || t_colors >= 256)
|
||||||
#endif
|
# endif
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cells,
|
FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cells,
|
||||||
@ -6479,9 +6479,9 @@ write_chars(
|
|||||||
|
|
||||||
// Cursor under VTP is always in the correct position, no need to reset.
|
// Cursor under VTP is always in the correct position, no need to reset.
|
||||||
if (!(vtp_working
|
if (!(vtp_working
|
||||||
#ifdef FEAT_TERMGUICOLORS
|
# ifdef FEAT_TERMGUICOLORS
|
||||||
&& (p_tgc || t_colors >= 256)
|
&& (p_tgc || t_colors >= 256)
|
||||||
#endif
|
# endif
|
||||||
))
|
))
|
||||||
gotoxy(g_coord.X + 1, g_coord.Y + 1);
|
gotoxy(g_coord.X + 1, g_coord.Y + 1);
|
||||||
|
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
880,
|
||||||
/**/
|
/**/
|
||||||
879,
|
879,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user