To: vim-dev@vim.org Subject: Patch 6.2.317 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.317 (after 6.2.313) Problem: When using "zi" in a diff window, other diff windows are not adjusted. (Richard Curnow) Solution: Distribute a change in 'foldenable' to other diff windows. Files: src/normal.c *** ../vim-6.2.316/src/normal.c Thu Mar 4 10:42:50 2004 --- src/normal.c Thu Mar 4 22:56:50 2004 *************** *** 4530,4538 **** } #ifdef FEAT_FOLDING ! /* Redraw when 'foldenable' or 'foldlevel' changed */ if (old_fen != curwin->w_p_fen) changed_window_setting(); if (old_fdl != curwin->w_p_fdl) newFoldLevel(); #endif --- 4537,4565 ---- } #ifdef FEAT_FOLDING ! /* Redraw when 'foldenable' changed */ if (old_fen != curwin->w_p_fen) + { + # ifdef FEAT_DIFF + win_T *wp; + + if (foldmethodIsDiff(curwin) && curwin->w_p_scb) + { + /* Adjust 'foldenable' in diff-synced windows. */ + FOR_ALL_WINDOWS(wp) + { + if (wp != curwin && foldmethodIsDiff(wp) && wp->w_p_scb) + { + wp->w_p_fen = curwin->w_p_fen; + changed_window_setting_win(wp); + } + } + } + # endif changed_window_setting(); + } + + /* Redraw when 'foldlevel' changed. */ if (old_fdl != curwin->w_p_fdl) newFoldLevel(); #endif *** ../vim-6.2.316/src/version.c Thu Mar 4 14:20:22 2004 --- src/version.c Fri Mar 5 12:10:41 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 317, /**/ -- It is illegal for anyone to try and stop a child from playfully jumping over puddles of water. [real standing law in California, United States of America] /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///