| To: vim-dev@vim.org |
| Subject: Patch 7.2.161 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.2.161 |
| Problem: Folds messed up in other tab page. (Vlad Irnov) |
| Solution: Instead of going over all windows in current tab page go over all |
| windows in all tab pages. Also free memory for location lists in |
| other tab pages when exiting. (Lech Lorens) |
| Files: src/fileio.c, src/mark.c, src/misc1.c, src/misc2.c |
| |
| |
| |
| |
| |
| *** 6846,6855 **** |
| #endif |
| #ifdef FEAT_FOLDING |
| { |
| ! win_T *wp; |
| |
| /* Update folds unless they are defined manually. */ |
| ! FOR_ALL_WINDOWS(wp) |
| if (wp->w_buffer == curwin->w_buffer |
| && !foldmethodIsManual(wp)) |
| foldUpdateAll(wp); |
| --- 6846,6856 ---- |
| #endif |
| #ifdef FEAT_FOLDING |
| { |
| ! win_T *wp; |
| ! tabpage_T *tp; |
| |
| /* Update folds unless they are defined manually. */ |
| ! FOR_ALL_TAB_WINDOWS(tp, wp) |
| if (wp->w_buffer == curwin->w_buffer |
| && !foldmethodIsManual(wp)) |
| foldUpdateAll(wp); |
| |
| |
| |
| *** 1023,1028 **** |
| --- 1023,1031 ---- |
| int fnum = curbuf->b_fnum; |
| linenr_T *lp; |
| win_T *win; |
| + #ifdef FEAT_WINDOWS |
| + tabpage_T *tab; |
| + #endif |
| |
| if (line2 < line1 && amount_after == 0L) /* nothing to do */ |
| return; |
| |
| *** 1064,1070 **** |
| /* quickfix marks */ |
| qf_mark_adjust(NULL, line1, line2, amount, amount_after); |
| /* location lists */ |
| ! FOR_ALL_WINDOWS(win) |
| qf_mark_adjust(win, line1, line2, amount, amount_after); |
| #endif |
| |
| --- 1067,1073 ---- |
| /* quickfix marks */ |
| qf_mark_adjust(NULL, line1, line2, amount, amount_after); |
| /* location lists */ |
| ! FOR_ALL_TAB_WINDOWS(tab, win) |
| qf_mark_adjust(win, line1, line2, amount, amount_after); |
| #endif |
| |
| |
| *** 1086,1092 **** |
| /* |
| * Adjust items in all windows related to the current buffer. |
| */ |
| ! FOR_ALL_WINDOWS(win) |
| { |
| #ifdef FEAT_JUMPLIST |
| if (!cmdmod.lockmarks) |
| --- 1089,1095 ---- |
| /* |
| * Adjust items in all windows related to the current buffer. |
| */ |
| ! FOR_ALL_TAB_WINDOWS(tab, win) |
| { |
| #ifdef FEAT_JUMPLIST |
| if (!cmdmod.lockmarks) |
| |
| |
| |
| *** 2717,2722 **** |
| --- 2717,2725 ---- |
| long xtra; |
| { |
| win_T *wp; |
| + #ifdef FEAT_WINDOWS |
| + tabpage_T *tp; |
| + #endif |
| int i; |
| #ifdef FEAT_JUMPLIST |
| int cols; |
| |
| *** 2769,2775 **** |
| curbuf->b_changelistlen = JUMPLISTSIZE - 1; |
| mch_memmove(curbuf->b_changelist, curbuf->b_changelist + 1, |
| sizeof(pos_T) * (JUMPLISTSIZE - 1)); |
| ! FOR_ALL_WINDOWS(wp) |
| { |
| /* Correct position in changelist for other windows on |
| * this buffer. */ |
| --- 2772,2778 ---- |
| curbuf->b_changelistlen = JUMPLISTSIZE - 1; |
| mch_memmove(curbuf->b_changelist, curbuf->b_changelist + 1, |
| sizeof(pos_T) * (JUMPLISTSIZE - 1)); |
| ! FOR_ALL_TAB_WINDOWS(tp, wp) |
| { |
| /* Correct position in changelist for other windows on |
| * this buffer. */ |
| |
| *** 2777,2783 **** |
| --wp->w_changelistidx; |
| } |
| } |
| ! FOR_ALL_WINDOWS(wp) |
| { |
| /* For other windows, if the position in the changelist is |
| * at the end it stays at the end. */ |
| --- 2780,2786 ---- |
| --wp->w_changelistidx; |
| } |
| } |
| ! FOR_ALL_TAB_WINDOWS(tp, wp) |
| { |
| /* For other windows, if the position in the changelist is |
| * at the end it stays at the end. */ |
| |
| *** 2796,2802 **** |
| #endif |
| } |
| |
| ! FOR_ALL_WINDOWS(wp) |
| { |
| if (wp->w_buffer == curbuf) |
| { |
| --- 2799,2805 ---- |
| #endif |
| } |
| |
| ! FOR_ALL_TAB_WINDOWS(tp, wp) |
| { |
| if (wp->w_buffer == curbuf) |
| { |
| |
| |
| |
| *** 1075,1085 **** |
| |
| #ifdef FEAT_QUICKFIX |
| { |
| ! win_T *win; |
| |
| qf_free_all(NULL); |
| /* Free all location lists */ |
| ! FOR_ALL_WINDOWS(win) |
| qf_free_all(win); |
| } |
| #endif |
| --- 1075,1086 ---- |
| |
| #ifdef FEAT_QUICKFIX |
| { |
| ! win_T *win; |
| ! tabpage_T *tab; |
| |
| qf_free_all(NULL); |
| /* Free all location lists */ |
| ! FOR_ALL_TAB_WINDOWS(tab, win) |
| qf_free_all(win); |
| } |
| #endif |
| |
| |
| |
| *** 678,679 **** |
| --- 678,681 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 161, |
| /**/ |
| |
| -- |
| CONCORDE: Quickly, sir, come this way! |
| LAUNCELOT: No! It's not right for my idiom. I must escape more ... more ... |
| CONCORDE: Dramatically, sir? |
| LAUNCELOT: Dramatically. |
| "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |