To: vim_dev@googlegroups.com Subject: Patch 8.2.4649 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4649 Problem: Various formatting problems. Solution: Improve the code formatting. Files: src/mark.c, src/quickfix.c, src/regexp_nfa.c, src/register.c, src/testdir/test_filechanged.vim, src/gui_athena.c, src/gui_motif.c, src/os_unix.c *** ../vim-8.2.4648/src/mark.c 2022-01-31 14:59:33.518943700 +0000 --- src/mark.c 2022-02-15 18:12:41.049417119 +0000 *************** *** 1002,1022 **** void mark_adjust_nofold( ! linenr_T line1, ! linenr_T line2, ! long amount, ! long amount_after) { mark_adjust_internal(line1, line2, amount, amount_after, FALSE); } static void mark_adjust_internal( ! linenr_T line1, ! linenr_T line2, ! long amount, ! long amount_after, ! int adjust_folds UNUSED) { int i; int fnum = curbuf->b_fnum; --- 1002,1022 ---- void mark_adjust_nofold( ! linenr_T line1, ! linenr_T line2, ! long amount, ! long amount_after) { mark_adjust_internal(line1, line2, amount, amount_after, FALSE); } static void mark_adjust_internal( ! linenr_T line1, ! linenr_T line2, ! long amount, ! long amount_after, ! int adjust_folds UNUSED) { int i; int fnum = curbuf->b_fnum; *** ../vim-8.2.4648/src/quickfix.c 2022-03-05 14:35:07.315171783 +0000 --- src/quickfix.c 2022-03-22 20:35:28.467388567 +0000 *************** *** 3194,3199 **** --- 3194,3200 ---- if (qfl_type == QFLT_LOCATION) { win_T *wp = win_id2wp(prev_winid); + if (wp == NULL && curwin->w_llist != qi) { emsg(_(e_current_window_was_closed)); *** ../vim-8.2.4648/src/regexp_nfa.c 2022-03-19 11:31:34.894039776 +0000 --- src/regexp_nfa.c 2022-03-29 13:15:33.108257398 +0100 *************** *** 6764,6771 **** case NFA_MARK_GT: case NFA_MARK_LT: { ! size_t col = rex.input - rex.line; ! pos_T *pos = getmark_buf(rex.reg_buf, t->state->val, FALSE); // Line may have been freed, get it again. if (REG_MULTI) --- 6764,6773 ---- case NFA_MARK_GT: case NFA_MARK_LT: { ! pos_T *pos; ! size_t col = REG_MULTI ? rex.input - rex.line : 0; ! ! pos = getmark_buf(rex.reg_buf, t->state->val, FALSE); // Line may have been freed, get it again. if (REG_MULTI) *** ../vim-8.2.4648/src/register.c 2022-03-19 11:42:13.449717210 +0000 --- src/register.c 2022-03-24 15:52:50.623206116 +0000 *************** *** 2399,2406 **** msg_puts_attr("^J", attr); n -= 2; } ! for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ! ++p) { clen = (*mb_ptr2len)(p); msg_outtrans_len(p, clen); --- 2399,2406 ---- msg_puts_attr("^J", attr); n -= 2; } ! for (p = yb->y_array[j]; ! *p != NUL && (n -= ptr2cells(p)) >= 0; ++p) { clen = (*mb_ptr2len)(p); msg_outtrans_len(p, clen); *** ../vim-8.2.4648/src/testdir/test_filechanged.vim 2022-02-11 20:55:12.208656608 +0000 --- src/testdir/test_filechanged.vim 2022-02-12 11:01:47.256528228 +0000 *************** *** 139,146 **** func Test_FileChangedShell_edit_dialog() CheckNotGui ! " FIXME: why does this not work on MS-Windows? ! CheckUnix new Xchanged_r call setline(1, 'reload this') --- 139,145 ---- func Test_FileChangedShell_edit_dialog() CheckNotGui ! CheckUnix " Using low level feedkeys() does not work on MS-Windows. new Xchanged_r call setline(1, 'reload this') *** ../vim-8.2.4648/src/gui_athena.c 2022-02-07 15:57:46.459385138 +0000 --- src/gui_athena.c 2022-03-06 21:33:33.454034658 +0000 *************** *** 1191,1197 **** #endif menu->parent = parent; ! menu->submenu_id = NULL; if (!XtIsManaged(toolBar) && vim_strchr(p_go, GO_TOOLBAR) != NULL) gui_mch_show_toolbar(TRUE); --- 1191,1197 ---- #endif menu->parent = parent; ! menu->submenu_id = (Widget)0; if (!XtIsManaged(toolBar) && vim_strchr(p_go, GO_TOOLBAR) != NULL) gui_mch_show_toolbar(TRUE); *** ../vim-8.2.4648/src/gui_motif.c 2022-03-24 18:04:42.733613365 +0000 --- src/gui_motif.c 2022-03-29 18:07:19.734461658 +0100 *************** *** 944,956 **** && tearoff_val == (int)XmTEAR_OFF_ENABLED ? 1 : 0), #endif NULL); - gui_motif_menu_colors(menu->id); - gui_motif_menu_fontlist(menu->id); XmStringFree(label); if (menu->id == (Widget)0) // failed return; // add accelerator text gui_motif_add_actext(menu); --- 944,964 ---- && tearoff_val == (int)XmTEAR_OFF_ENABLED ? 1 : 0), #endif NULL); XmStringFree(label); if (menu->id == (Widget)0) // failed return; + // The "Help" menu is a special case, and should be placed at the far + // right hand side of the menu-bar. It's recognized by its high priority. + if (parent == NULL && menu->priority >= 9999) + XtVaSetValues(menuBar, + XmNmenuHelpWidget, menu->id, + NULL); + + gui_motif_menu_colors(menu->id); + gui_motif_menu_fontlist(menu->id); + // add accelerator text gui_motif_add_actext(menu); *************** *** 978,996 **** XmNsubMenuId, menu->submenu_id, NULL); ! /* ! * The "Help" menu is a special case, and should be placed at the far ! * right hand side of the menu-bar. It's recognized by its high priority. ! */ ! if (parent == NULL && menu->priority >= 9999) ! XtVaSetValues(menuBar, ! XmNmenuHelpWidget, menu->id, ! NULL); ! ! /* ! * When we add a top-level item to the menu bar, we can figure out how ! * high the menu bar should be. ! */ if (parent == NULL) gui_mch_compute_menu_height(menu->id); } --- 986,993 ---- XmNsubMenuId, menu->submenu_id, NULL); ! // When we add a top-level item to the menu bar, we can figure out how ! // high the menu bar should be. if (parent == NULL) gui_mch_compute_menu_height(menu->id); } *** ../vim-8.2.4648/src/os_unix.c 2022-03-13 17:27:34.174619983 +0000 --- src/os_unix.c 2022-03-24 15:14:46.772767814 +0000 *************** *** 3762,3768 **** static int mouse_ison = FALSE; /* ! * Set mouse clicks on or off. */ void mch_setmouse(int on) --- 3762,3768 ---- static int mouse_ison = FALSE; /* ! * Set mouse clicks on or off and possible enable mouse movement events. */ void mch_setmouse(int on) *** ../vim-8.2.4648/src/version.c 2022-03-30 10:14:41.489657276 +0100 --- src/version.c 2022-03-30 10:53:20.963750615 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4649, /**/ -- Life is a gift, living is an art. (Bram Moolenaar) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///