]> granicus.if.org Git - vim/commitdiff
patch 8.2.4288: preprocessor indents are inconsistent v8.2.4288
authorK.Takata <kentkt@csc.jp>
Thu, 3 Feb 2022 13:05:32 +0000 (13:05 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 3 Feb 2022 13:05:32 +0000 (13:05 +0000)
Problem:    Preprocessor indents are inconsistent.
Solution:   Fix preprocessor indents. (Ken Takata, closes #9691)

src/arglist.c
src/change.c
src/ex_cmds.c
src/gui.c
src/hashtab.c
src/indent.c
src/ops.c
src/os_win32.c
src/version.c

index fbd99af0d3d44393b7ad6c8fb799dd3fbdf29366..5c2236927e0760f2e182651e83e9621a73189241 100644 (file)
@@ -969,9 +969,9 @@ do_arg_all(
     old_curwin = curwin;
     old_curtab = curtab;
 
-# ifdef FEAT_GUI
+#ifdef FEAT_GUI
     need_mouse_correct = TRUE;
-# endif
+#endif
 
     // Try closing all windows that are not in the argument list.
     // Also close windows that are not full width;
index 9f1705f2a4ce96fb4ae96661b361ac38c2993b92..25a0841909b978abf6fc12aeb9f274d9b0c972e1 100644 (file)
@@ -1638,9 +1638,9 @@ open_line(
 #ifdef FEAT_CINDENT
     // May do indenting after opening a new line.
     do_cindent = !p_paste && (curbuf->b_p_cin
-#  ifdef FEAT_EVAL
+# ifdef FEAT_EVAL
                    || *curbuf->b_p_inde != NUL
-#  endif
+# endif
                )
            && in_cinkeys(dir == FORWARD
                ? KEY_OPEN_FORW
index d9d532c919d20f827af9c277a912f2b5d7ad4695..91a2fa722dbfaaa82817289b4852c29d089edc39 100644 (file)
@@ -99,9 +99,9 @@ do_ascii(exarg_T *eap UNUSED)
            IObuff[len++] = ' ';
        IObuff[len++] = '<';
        if (enc_utf8 && utf_iscomposing(c)
-# ifdef USE_GUI
+#ifdef USE_GUI
                && !gui.in_use
-# endif
+#endif
                )
            IObuff[len++] = ' '; // draw composing char on top of a space
        len += (*mb_char2bytes)(c, IObuff + len);
index 0cce1f111a248ed7e7ee279cc9831a585fa7eb76..fb589fc1c790d972e552f09361de5540dac5a611 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -292,11 +292,11 @@ gui_do_fork(void)
     }
     // Child
 
-#ifdef FEAT_GUI_GTK
+# ifdef FEAT_GUI_GTK
     // Call gtk_init_check() here after fork(). See gui_init_check().
     if (gui_mch_init_check() != OK)
        getout_preserve_modified(1);
-#endif
+# endif
 
 # if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
     /*
@@ -348,11 +348,11 @@ gui_do_fork(void)
 gui_read_child_pipe(int fd)
 {
     long       bytes_read;
-#define READ_BUFFER_SIZE 10
+# define READ_BUFFER_SIZE 10
     char       buffer[READ_BUFFER_SIZE];
 
     bytes_read = read_eintr(fd, buffer, READ_BUFFER_SIZE - 1);
-#undef READ_BUFFER_SIZE
+# undef READ_BUFFER_SIZE
     close(fd);
     if (bytes_read < 0)
        return GUI_CHILD_IO_ERROR;
@@ -459,7 +459,7 @@ gui_init_check(void)
     gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH;
     gui.prev_wrap = -1;
 
-# ifdef FEAT_GUI_GTK
+#ifdef FEAT_GUI_GTK
     CLEAR_FIELD(gui.ligatures_map);
 #endif
 
@@ -1435,7 +1435,7 @@ gui_position_components(int total_width UNUSED)
        text_area_y += gui.menu_height;
 #endif
 
-# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
+#if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
        || defined(FEAT_GUI_MOTIF))
     if (gui_has_tabline())
        text_area_y += gui.tabline_height;
@@ -1453,7 +1453,7 @@ gui_position_components(int total_width UNUSED)
     }
 #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.menu_width, gui.tabline_height);
     if (gui_has_tabline())
@@ -5235,10 +5235,10 @@ gui_update_screen(void)
     {
        if (has_cursormoved())
            apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
-#ifdef FEAT_PROP_POPUP
+# ifdef FEAT_PROP_POPUP
        if (popup_visible)
            popup_check_cursor_pos();
-#endif
+# endif
 # ifdef FEAT_CONCEAL
        if (curwin->w_p_cole > 0)
        {
index 482d83005e049ed88c793028a8a4b2196d245b57..a7470ecdc1d6f8fba87a21eb0fcd83a3513a8efc 100644 (file)
@@ -189,13 +189,13 @@ hash_lookup(hashtab_T *ht, char_u *key, hash_T hash)
     void
 hash_debug_results(void)
 {
-#ifdef HT_DEBUG
+# ifdef HT_DEBUG
     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 perturb loops: %ld\r\n", hash_count_perturb);
     fprintf(stderr, "Percentage of perturb loops: %ld%%\r\n",
                                hash_count_perturb * 100 / hash_count_lookup);
-#endif
+# endif
 }
 #endif
 
index 8e9b0d148cfbf88476311094e5f6072853a295de..b62308d2a46de2606d843da6b2ea1bcac43c8cee 100644 (file)
@@ -2173,7 +2173,7 @@ f_indent(typval_T *argvars, typval_T *rettv)
     void
 f_lispindent(typval_T *argvars UNUSED, typval_T *rettv)
 {
-#ifdef FEAT_LISP
+# ifdef FEAT_LISP
     pos_T      pos;
     linenr_T   lnum;
 
@@ -2191,7 +2191,7 @@ f_lispindent(typval_T *argvars UNUSED, typval_T *rettv)
     else if (in_vim9script())
        semsg(_(e_invalid_line_number_nr), lnum);
     else
-#endif
+# endif
        rettv->vval.v_number = -1;
 }
 #endif
index 418c46daa4153630888e594c594831a74cb58ca2..8c463033c153d67c1b07e07cc18508303d246a3d 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -3667,9 +3667,9 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
                curbuf->b_visual.vi_mode = VIsual_mode;
                restore_visual_mode();
                curbuf->b_visual.vi_curswant = curwin->w_curswant;
-# ifdef FEAT_EVAL
+#ifdef FEAT_EVAL
                curbuf->b_visual_mode_eval = VIsual_mode;
-# endif
+#endif
            }
 
            // In Select mode, a linewise selection is operated upon like a
index 36b2cf12665bb77b7dfeed4fb0236533fb0c6c7c..18b9e59792ece0d64308017bcd5fc7d357e78192 100644 (file)
@@ -241,11 +241,11 @@ static char_u *exe_path = NULL;
 
 static BOOL win8_or_later = FALSE;
 
-# if defined(__GNUC__) && !defined(__MINGW32__)  && !defined(__CYGWIN__)
-#  define UChar UnicodeChar
-# else
-#  define UChar uChar.UnicodeChar
-# endif
+#if defined(__GNUC__) && !defined(__MINGW32__)  && !defined(__CYGWIN__)
+# define UChar UnicodeChar
+#else
+# define UChar uChar.UnicodeChar
+#endif
 
 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
 // Dynamic loading for portability
@@ -2077,13 +2077,13 @@ theend:
        buf[len++] = typeahead[0];
        mch_memmove(typeahead, typeahead + 1, --typeaheadlen);
     }
-#  ifdef FEAT_JOB_CHANNEL
+# ifdef FEAT_JOB_CHANNEL
     if (len > 0)
     {
        buf[len] = NUL;
        ch_log(NULL, "raw key input: \"%s\"", buf);
     }
-#  endif
+# endif
     return len;
 
 #else // FEAT_GUI_MSWIN
@@ -7874,12 +7874,12 @@ vtp_sgr_bulk(
     vtp_sgr_bulks(1, args);
 }
 
-#define FAST256(x) \
+# define FAST256(x) \
     if ((*p-- = "0123456789"[(n = x % 10)]) \
            && x >= 10 && (*p-- = "0123456789"[((m = x % 100) - n) / 10]) \
            && x >= 100 && (*p-- = "012"[((x & 0xff) - m) / 100]));
 
-#define FAST256CASE(x) \
+# define FAST256CASE(x) \
     case x: \
        FAST256(newargs[x - 1]);
 
@@ -7888,8 +7888,8 @@ vtp_sgr_bulks(
     int argc,
     int *args)
 {
-#define MAXSGR 16
-#define SGRBUFSIZE 2 + 4 * MAXSGR + 1 // '\033[' + SGR + 'm'
+# define MAXSGR 16
+# define SGRBUFSIZE 2 + 4 * MAXSGR + 1 // '\033[' + SGR + 'm'
     char_u  buf[SGRBUFSIZE];
     char_u  *p;
     int            in, out;
index b53b4eb3dfaa19932ec04155ee4017fe6d3ebdcf..cc4e7d29bec6d28d5914d9375e5c317f629ca469 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4288,
 /**/
     4287,
 /**/