mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.4288: preprocessor indents are inconsistent
Problem: Preprocessor indents are inconsistent. Solution: Fix preprocessor indents. (Ken Takata, closes #9691)
This commit is contained in:
@@ -969,9 +969,9 @@ do_arg_all(
|
|||||||
old_curwin = curwin;
|
old_curwin = curwin;
|
||||||
old_curtab = curtab;
|
old_curtab = curtab;
|
||||||
|
|
||||||
# ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
need_mouse_correct = TRUE;
|
need_mouse_correct = TRUE;
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
// Try closing all windows that are not in the argument list.
|
// Try closing all windows that are not in the argument list.
|
||||||
// Also close windows that are not full width;
|
// Also close windows that are not full width;
|
||||||
|
@@ -99,9 +99,9 @@ do_ascii(exarg_T *eap UNUSED)
|
|||||||
IObuff[len++] = ' ';
|
IObuff[len++] = ' ';
|
||||||
IObuff[len++] = '<';
|
IObuff[len++] = '<';
|
||||||
if (enc_utf8 && utf_iscomposing(c)
|
if (enc_utf8 && utf_iscomposing(c)
|
||||||
# ifdef USE_GUI
|
#ifdef USE_GUI
|
||||||
&& !gui.in_use
|
&& !gui.in_use
|
||||||
# endif
|
#endif
|
||||||
)
|
)
|
||||||
IObuff[len++] = ' '; // draw composing char on top of a space
|
IObuff[len++] = ' '; // draw composing char on top of a space
|
||||||
len += (*mb_char2bytes)(c, IObuff + len);
|
len += (*mb_char2bytes)(c, IObuff + len);
|
||||||
|
18
src/gui.c
18
src/gui.c
@@ -292,11 +292,11 @@ gui_do_fork(void)
|
|||||||
}
|
}
|
||||||
// Child
|
// Child
|
||||||
|
|
||||||
#ifdef FEAT_GUI_GTK
|
# ifdef FEAT_GUI_GTK
|
||||||
// Call gtk_init_check() here after fork(). See gui_init_check().
|
// Call gtk_init_check() here after fork(). See gui_init_check().
|
||||||
if (gui_mch_init_check() != OK)
|
if (gui_mch_init_check() != OK)
|
||||||
getout_preserve_modified(1);
|
getout_preserve_modified(1);
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
# if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
|
# if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
|
||||||
/*
|
/*
|
||||||
@@ -348,11 +348,11 @@ gui_do_fork(void)
|
|||||||
gui_read_child_pipe(int fd)
|
gui_read_child_pipe(int fd)
|
||||||
{
|
{
|
||||||
long bytes_read;
|
long bytes_read;
|
||||||
#define READ_BUFFER_SIZE 10
|
# define READ_BUFFER_SIZE 10
|
||||||
char buffer[READ_BUFFER_SIZE];
|
char buffer[READ_BUFFER_SIZE];
|
||||||
|
|
||||||
bytes_read = read_eintr(fd, buffer, READ_BUFFER_SIZE - 1);
|
bytes_read = read_eintr(fd, buffer, READ_BUFFER_SIZE - 1);
|
||||||
#undef READ_BUFFER_SIZE
|
# undef READ_BUFFER_SIZE
|
||||||
close(fd);
|
close(fd);
|
||||||
if (bytes_read < 0)
|
if (bytes_read < 0)
|
||||||
return GUI_CHILD_IO_ERROR;
|
return GUI_CHILD_IO_ERROR;
|
||||||
@@ -459,7 +459,7 @@ gui_init_check(void)
|
|||||||
gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH;
|
gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH;
|
||||||
gui.prev_wrap = -1;
|
gui.prev_wrap = -1;
|
||||||
|
|
||||||
# ifdef FEAT_GUI_GTK
|
#ifdef FEAT_GUI_GTK
|
||||||
CLEAR_FIELD(gui.ligatures_map);
|
CLEAR_FIELD(gui.ligatures_map);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1435,7 +1435,7 @@ gui_position_components(int total_width UNUSED)
|
|||||||
text_area_y += gui.menu_height;
|
text_area_y += gui.menu_height;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
|
#if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
|
||||||
|| defined(FEAT_GUI_MOTIF))
|
|| defined(FEAT_GUI_MOTIF))
|
||||||
if (gui_has_tabline())
|
if (gui_has_tabline())
|
||||||
text_area_y += gui.tabline_height;
|
text_area_y += gui.tabline_height;
|
||||||
@@ -1453,7 +1453,7 @@ gui_position_components(int total_width UNUSED)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_HAIKU)
|
#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_HAIKU)
|
||||||
gui_mch_set_tabline_pos(0, text_area_y,
|
gui_mch_set_tabline_pos(0, text_area_y,
|
||||||
gui.menu_width, gui.tabline_height);
|
gui.menu_width, gui.tabline_height);
|
||||||
if (gui_has_tabline())
|
if (gui_has_tabline())
|
||||||
@@ -5235,10 +5235,10 @@ gui_update_screen(void)
|
|||||||
{
|
{
|
||||||
if (has_cursormoved())
|
if (has_cursormoved())
|
||||||
apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
|
apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
|
||||||
#ifdef FEAT_PROP_POPUP
|
# ifdef FEAT_PROP_POPUP
|
||||||
if (popup_visible)
|
if (popup_visible)
|
||||||
popup_check_cursor_pos();
|
popup_check_cursor_pos();
|
||||||
#endif
|
# endif
|
||||||
# ifdef FEAT_CONCEAL
|
# ifdef FEAT_CONCEAL
|
||||||
if (curwin->w_p_cole > 0)
|
if (curwin->w_p_cole > 0)
|
||||||
{
|
{
|
||||||
|
@@ -189,13 +189,13 @@ hash_lookup(hashtab_T *ht, char_u *key, hash_T hash)
|
|||||||
void
|
void
|
||||||
hash_debug_results(void)
|
hash_debug_results(void)
|
||||||
{
|
{
|
||||||
#ifdef HT_DEBUG
|
# ifdef HT_DEBUG
|
||||||
fprintf(stderr, "\r\n\r\n\r\n\r\n");
|
fprintf(stderr, "\r\n\r\n\r\n\r\n");
|
||||||
fprintf(stderr, "Number of hashtable lookups: %ld\r\n", hash_count_lookup);
|
fprintf(stderr, "Number of hashtable lookups: %ld\r\n", hash_count_lookup);
|
||||||
fprintf(stderr, "Number of perturb loops: %ld\r\n", hash_count_perturb);
|
fprintf(stderr, "Number of perturb loops: %ld\r\n", hash_count_perturb);
|
||||||
fprintf(stderr, "Percentage of perturb loops: %ld%%\r\n",
|
fprintf(stderr, "Percentage of perturb loops: %ld%%\r\n",
|
||||||
hash_count_perturb * 100 / hash_count_lookup);
|
hash_count_perturb * 100 / hash_count_lookup);
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2173,7 +2173,7 @@ f_indent(typval_T *argvars, typval_T *rettv)
|
|||||||
void
|
void
|
||||||
f_lispindent(typval_T *argvars UNUSED, typval_T *rettv)
|
f_lispindent(typval_T *argvars UNUSED, typval_T *rettv)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_LISP
|
# ifdef FEAT_LISP
|
||||||
pos_T pos;
|
pos_T pos;
|
||||||
linenr_T lnum;
|
linenr_T lnum;
|
||||||
|
|
||||||
@@ -2191,7 +2191,7 @@ f_lispindent(typval_T *argvars UNUSED, typval_T *rettv)
|
|||||||
else if (in_vim9script())
|
else if (in_vim9script())
|
||||||
semsg(_(e_invalid_line_number_nr), lnum);
|
semsg(_(e_invalid_line_number_nr), lnum);
|
||||||
else
|
else
|
||||||
#endif
|
# endif
|
||||||
rettv->vval.v_number = -1;
|
rettv->vval.v_number = -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -3667,9 +3667,9 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
|
|||||||
curbuf->b_visual.vi_mode = VIsual_mode;
|
curbuf->b_visual.vi_mode = VIsual_mode;
|
||||||
restore_visual_mode();
|
restore_visual_mode();
|
||||||
curbuf->b_visual.vi_curswant = curwin->w_curswant;
|
curbuf->b_visual.vi_curswant = curwin->w_curswant;
|
||||||
# ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
curbuf->b_visual_mode_eval = VIsual_mode;
|
curbuf->b_visual_mode_eval = VIsual_mode;
|
||||||
# endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// In Select mode, a linewise selection is operated upon like a
|
// In Select mode, a linewise selection is operated upon like a
|
||||||
|
@@ -241,11 +241,11 @@ static char_u *exe_path = NULL;
|
|||||||
|
|
||||||
static BOOL win8_or_later = FALSE;
|
static BOOL win8_or_later = FALSE;
|
||||||
|
|
||||||
# if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
|
#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
|
||||||
# define UChar UnicodeChar
|
# define UChar UnicodeChar
|
||||||
# else
|
#else
|
||||||
# define UChar uChar.UnicodeChar
|
# define UChar uChar.UnicodeChar
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
|
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
|
||||||
// Dynamic loading for portability
|
// Dynamic loading for portability
|
||||||
@@ -7874,12 +7874,12 @@ vtp_sgr_bulk(
|
|||||||
vtp_sgr_bulks(1, args);
|
vtp_sgr_bulks(1, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FAST256(x) \
|
# define FAST256(x) \
|
||||||
if ((*p-- = "0123456789"[(n = x % 10)]) \
|
if ((*p-- = "0123456789"[(n = x % 10)]) \
|
||||||
&& x >= 10 && (*p-- = "0123456789"[((m = x % 100) - n) / 10]) \
|
&& x >= 10 && (*p-- = "0123456789"[((m = x % 100) - n) / 10]) \
|
||||||
&& x >= 100 && (*p-- = "012"[((x & 0xff) - m) / 100]));
|
&& x >= 100 && (*p-- = "012"[((x & 0xff) - m) / 100]));
|
||||||
|
|
||||||
#define FAST256CASE(x) \
|
# define FAST256CASE(x) \
|
||||||
case x: \
|
case x: \
|
||||||
FAST256(newargs[x - 1]);
|
FAST256(newargs[x - 1]);
|
||||||
|
|
||||||
@@ -7888,8 +7888,8 @@ vtp_sgr_bulks(
|
|||||||
int argc,
|
int argc,
|
||||||
int *args)
|
int *args)
|
||||||
{
|
{
|
||||||
#define MAXSGR 16
|
# define MAXSGR 16
|
||||||
#define SGRBUFSIZE 2 + 4 * MAXSGR + 1 // '\033[' + SGR + 'm'
|
# define SGRBUFSIZE 2 + 4 * MAXSGR + 1 // '\033[' + SGR + 'm'
|
||||||
char_u buf[SGRBUFSIZE];
|
char_u buf[SGRBUFSIZE];
|
||||||
char_u *p;
|
char_u *p;
|
||||||
int in, out;
|
int in, out;
|
||||||
|
@@ -746,6 +746,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 */
|
||||||
|
/**/
|
||||||
|
4288,
|
||||||
/**/
|
/**/
|
||||||
4287,
|
4287,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user