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
|
||||
do_c_expr_indent(void)
|
||||
{
|
||||
# ifdef FEAT_EVAL
|
||||
#ifdef FEAT_EVAL
|
||||
if (*curbuf->b_p_inde != NUL)
|
||||
fixthisline(get_expr_indent);
|
||||
else
|
||||
# endif
|
||||
#endif
|
||||
fixthisline(get_c_indent);
|
||||
}
|
||||
|
||||
|
@ -2756,7 +2756,7 @@ get_behave_arg(expand_T *xp UNUSED, int idx)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
# ifdef FEAT_EVAL
|
||||
#ifdef FEAT_EVAL
|
||||
/*
|
||||
* Function given to ExpandGeneric() to obtain the possible arguments of the
|
||||
* ":breakadd {expr, file, func, here}" command.
|
||||
@ -3020,10 +3020,10 @@ ExpandFromContext(
|
||||
char *directories[] = {"syntax", "indent", "ftplugin", NULL};
|
||||
return ExpandRTDir(pat, 0, numMatches, matches, directories);
|
||||
}
|
||||
# if defined(FEAT_EVAL)
|
||||
#if defined(FEAT_EVAL)
|
||||
if (xp->xp_context == EXPAND_USER_LIST)
|
||||
return ExpandUserList(xp, matches, numMatches);
|
||||
# endif
|
||||
#endif
|
||||
if (xp->xp_context == EXPAND_PACKADD)
|
||||
return ExpandPackAddDir(pat, numMatches, matches);
|
||||
|
||||
@ -3057,10 +3057,10 @@ ExpandFromContext(
|
||||
ret = ExpandSettings(xp, ®match, pat, numMatches, matches, fuzzy);
|
||||
else if (xp->xp_context == EXPAND_MAPPINGS)
|
||||
ret = ExpandMappings(pat, ®match, numMatches, matches);
|
||||
# if defined(FEAT_EVAL)
|
||||
#if defined(FEAT_EVAL)
|
||||
else if (xp->xp_context == EXPAND_USER_DEFINED)
|
||||
ret = ExpandUserDefined(pat, xp, ®match, matches, numMatches);
|
||||
# endif
|
||||
#endif
|
||||
else
|
||||
ret = ExpandOther(pat, xp, ®match, matches, numMatches);
|
||||
|
||||
@ -3168,7 +3168,7 @@ ExpandGeneric(
|
||||
else
|
||||
((char_u **)ga.ga_data)[ga.ga_len] = str;
|
||||
|
||||
# ifdef FEAT_MENU
|
||||
#ifdef FEAT_MENU
|
||||
if (func == get_menu_names)
|
||||
{
|
||||
// test for separator added by get_menu_names()
|
||||
@ -3176,7 +3176,7 @@ ExpandGeneric(
|
||||
if (*str == '\001')
|
||||
*str = '.';
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
++ga.ga_len;
|
||||
}
|
||||
@ -3350,11 +3350,11 @@ expand_shellcmd(
|
||||
hash_init(&found_ht);
|
||||
for (s = path; ; s = e)
|
||||
{
|
||||
# if defined(MSWIN)
|
||||
#if defined(MSWIN)
|
||||
e = vim_strchr(s, ';');
|
||||
# else
|
||||
#else
|
||||
e = vim_strchr(s, ':');
|
||||
# endif
|
||||
#endif
|
||||
if (e == NULL)
|
||||
e = s + STRLEN(s);
|
||||
|
||||
@ -3396,7 +3396,7 @@ expand_shellcmd(
|
||||
return OK;
|
||||
}
|
||||
|
||||
# if defined(FEAT_EVAL)
|
||||
#if defined(FEAT_EVAL)
|
||||
/*
|
||||
* Call "user_expand_func()" to invoke a user defined Vim script function and
|
||||
* return the result (either a string, a List or NULL).
|
||||
@ -3580,7 +3580,7 @@ ExpandUserList(
|
||||
*numMatches = ga.ga_len;
|
||||
return OK;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Expand "file" for all comma-separated directories in "path".
|
||||
@ -3613,14 +3613,14 @@ globpath(
|
||||
copy_option_part(&path, buf, MAXPATHL, ",");
|
||||
if (STRLEN(buf) + STRLEN(file) + 2 < MAXPATHL)
|
||||
{
|
||||
# if defined(MSWIN)
|
||||
#if defined(MSWIN)
|
||||
// Using the platform's path separator (\) makes vim incorrectly
|
||||
// treat it as an escape character, use '/' instead.
|
||||
if (*buf != NUL && !after_pathsep(buf, buf + STRLEN(buf)))
|
||||
STRCAT(buf, "/");
|
||||
# else
|
||||
#else
|
||||
add_pathsep(buf);
|
||||
# endif
|
||||
#endif
|
||||
STRCAT(buf, file);
|
||||
if (ExpandFromContext(&xpc, buf, &p, &num_p,
|
||||
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)
|
||||
j -= (*mb_head_off)(cclp->cmdbuff, cclp->cmdbuff + j);
|
||||
if (vim_ispathsep(cclp->cmdbuff[j])
|
||||
# ifdef BACKSLASH_IN_FILENAME
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
&& vim_strchr((char_u *)" *?[{`$%#",
|
||||
cclp->cmdbuff[j + 1]) == NULL
|
||||
# endif
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (found)
|
||||
|
@ -230,10 +230,10 @@ gui_do_fork(void)
|
||||
int exit_status;
|
||||
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
|
||||
delete_timer();
|
||||
#endif
|
||||
# endif
|
||||
|
||||
// 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
|
||||
|
@ -147,7 +147,7 @@
|
||||
|
||||
// Suppress Infinite warnings when compiling XS modules under macOS 12 Monterey.
|
||||
#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
|
||||
|
||||
/* Compatibility hacks over */
|
||||
|
@ -83,7 +83,7 @@
|
||||
|
||||
// Suppress Python 3.11 depreciations to see useful warnings
|
||||
#if defined(__clang__) && defined(__clang_major__) && __clang_major__ > 11
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
// 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_yMouse = pmer->dwMousePosition.Y;
|
||||
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
# ifdef FEAT_PROP_POPUP
|
||||
int lcol = g_xMouse;
|
||||
int lrow = g_yMouse;
|
||||
win_T *wp = mouse_find_win(&lrow, &lcol, FIND_POPUP);
|
||||
@ -1294,7 +1294,7 @@ decode_mouse_wheel(MOUSE_EVENT_RECORD *pmer)
|
||||
out_flush();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
mouse_col = g_xMouse;
|
||||
mouse_row = g_yMouse;
|
||||
|
||||
@ -6059,9 +6059,9 @@ insert_lines(unsigned cLines)
|
||||
|
||||
fill.Char.AsciiChar = ' ';
|
||||
if (!(vtp_working
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
# ifdef FEAT_TERMGUICOLORS
|
||||
&& (p_tgc || t_colors >= 256)
|
||||
#endif
|
||||
# endif
|
||||
))
|
||||
fill.Attributes = g_attrCurrent;
|
||||
else
|
||||
@ -6187,9 +6187,9 @@ gotoxy(
|
||||
return;
|
||||
|
||||
if (!(vtp_working
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
# ifdef FEAT_TERMGUICOLORS
|
||||
&& (p_tgc || t_colors >= 256)
|
||||
#endif
|
||||
# endif
|
||||
))
|
||||
{
|
||||
// There are reports of double-width characters not displayed
|
||||
@ -6435,9 +6435,9 @@ write_chars(
|
||||
}
|
||||
|
||||
if (!(vtp_working
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
# ifdef FEAT_TERMGUICOLORS
|
||||
&& (p_tgc || t_colors >= 256)
|
||||
#endif
|
||||
# endif
|
||||
))
|
||||
{
|
||||
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.
|
||||
if (!(vtp_working
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
# ifdef FEAT_TERMGUICOLORS
|
||||
&& (p_tgc || t_colors >= 256)
|
||||
#endif
|
||||
# endif
|
||||
))
|
||||
gotoxy(g_coord.X + 1, g_coord.Y + 1);
|
||||
|
||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
880,
|
||||
/**/
|
||||
879,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user