comparison src/gui.c @ 27521:3ad379c0ab28 v8.2.4288

patch 8.2.4288: preprocessor indents are inconsistent Commit: https://github.com/vim/vim/commit/6e1d31e9e3ca42cb883abca198f011dc6f4ceb14 Author: K.Takata <kentkt@csc.jp> Date: Thu Feb 3 13:05:32 2022 +0000 patch 8.2.4288: preprocessor indents are inconsistent Problem: Preprocessor indents are inconsistent. Solution: Fix preprocessor indents. (Ken Takata, closes https://github.com/vim/vim/issues/9691)
author Bram Moolenaar <Bram@vim.org>
date Thu, 03 Feb 2022 14:15:03 +0100
parents fb4c30606b4a
children d27a9eed9849
comparison
equal deleted inserted replaced
27520:22f899e99b3f 27521:3ad379c0ab28
290 */ 290 */
291 _exit(0); 291 _exit(0);
292 } 292 }
293 // Child 293 // Child
294 294
295 #ifdef FEAT_GUI_GTK 295 # ifdef FEAT_GUI_GTK
296 // Call gtk_init_check() here after fork(). See gui_init_check(). 296 // Call gtk_init_check() here after fork(). See gui_init_check().
297 if (gui_mch_init_check() != OK) 297 if (gui_mch_init_check() != OK)
298 getout_preserve_modified(1); 298 getout_preserve_modified(1);
299 #endif 299 # endif
300 300
301 # if defined(HAVE_SETSID) || defined(HAVE_SETPGID) 301 # if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
302 /* 302 /*
303 * Change our process group. On some systems/shells a CTRL-C in the 303 * Change our process group. On some systems/shells a CTRL-C in the
304 * shell where Vim was started would otherwise kill gvim! 304 * shell where Vim was started would otherwise kill gvim!
346 */ 346 */
347 static int 347 static int
348 gui_read_child_pipe(int fd) 348 gui_read_child_pipe(int fd)
349 { 349 {
350 long bytes_read; 350 long bytes_read;
351 #define READ_BUFFER_SIZE 10 351 # define READ_BUFFER_SIZE 10
352 char buffer[READ_BUFFER_SIZE]; 352 char buffer[READ_BUFFER_SIZE];
353 353
354 bytes_read = read_eintr(fd, buffer, READ_BUFFER_SIZE - 1); 354 bytes_read = read_eintr(fd, buffer, READ_BUFFER_SIZE - 1);
355 #undef READ_BUFFER_SIZE 355 # undef READ_BUFFER_SIZE
356 close(fd); 356 close(fd);
357 if (bytes_read < 0) 357 if (bytes_read < 0)
358 return GUI_CHILD_IO_ERROR; 358 return GUI_CHILD_IO_ERROR;
359 buffer[bytes_read] = NUL; 359 buffer[bytes_read] = NUL;
360 if (strcmp(buffer, "ok") == 0) 360 if (strcmp(buffer, "ok") == 0)
457 #endif 457 #endif
458 458
459 gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH; 459 gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH;
460 gui.prev_wrap = -1; 460 gui.prev_wrap = -1;
461 461
462 # ifdef FEAT_GUI_GTK 462 #ifdef FEAT_GUI_GTK
463 CLEAR_FIELD(gui.ligatures_map); 463 CLEAR_FIELD(gui.ligatures_map);
464 #endif 464 #endif
465 465
466 #if defined(ALWAYS_USE_GUI) || defined(VIMDLL) 466 #if defined(ALWAYS_USE_GUI) || defined(VIMDLL)
467 result = OK; 467 result = OK;
1433 gui.menu_width = total_width; 1433 gui.menu_width = total_width;
1434 if (gui.menu_is_active) 1434 if (gui.menu_is_active)
1435 text_area_y += gui.menu_height; 1435 text_area_y += gui.menu_height;
1436 #endif 1436 #endif
1437 1437
1438 # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \ 1438 #if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
1439 || defined(FEAT_GUI_MOTIF)) 1439 || defined(FEAT_GUI_MOTIF))
1440 if (gui_has_tabline()) 1440 if (gui_has_tabline())
1441 text_area_y += gui.tabline_height; 1441 text_area_y += gui.tabline_height;
1442 #endif 1442 #endif
1443 1443
1451 # endif 1451 # endif
1452 text_area_y += gui.toolbar_height; 1452 text_area_y += gui.toolbar_height;
1453 } 1453 }
1454 #endif 1454 #endif
1455 1455
1456 # if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_HAIKU) 1456 #if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_HAIKU)
1457 gui_mch_set_tabline_pos(0, text_area_y, 1457 gui_mch_set_tabline_pos(0, text_area_y,
1458 gui.menu_width, gui.tabline_height); 1458 gui.menu_width, gui.tabline_height);
1459 if (gui_has_tabline()) 1459 if (gui_has_tabline())
1460 text_area_y += gui.tabline_height; 1460 text_area_y += gui.tabline_height;
1461 #endif 1461 #endif
5233 # endif 5233 # endif
5234 ) && !EQUAL_POS(last_cursormoved, curwin->w_cursor)) 5234 ) && !EQUAL_POS(last_cursormoved, curwin->w_cursor))
5235 { 5235 {
5236 if (has_cursormoved()) 5236 if (has_cursormoved())
5237 apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); 5237 apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
5238 #ifdef FEAT_PROP_POPUP 5238 # ifdef FEAT_PROP_POPUP
5239 if (popup_visible) 5239 if (popup_visible)
5240 popup_check_cursor_pos(); 5240 popup_check_cursor_pos();
5241 #endif 5241 # endif
5242 # ifdef FEAT_CONCEAL 5242 # ifdef FEAT_CONCEAL
5243 if (curwin->w_p_cole > 0) 5243 if (curwin->w_p_cole > 0)
5244 { 5244 {
5245 conceal_old_cursor_line = last_cursormoved.lnum; 5245 conceal_old_cursor_line = last_cursormoved.lnum;
5246 conceal_new_cursor_line = curwin->w_cursor.lnum; 5246 conceal_new_cursor_line = curwin->w_cursor.lnum;