To: vim-dev@vim.org Subject: Patch 6.2.086 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.086 Problem: "{" and "}" stop inside a closed fold. Solution: Only stop once inside a closed fold. (Stephen Riehm) Files: src/search.c *** ../vim-6.2.085/src/search.c Sun May 18 19:31:28 2003 --- src/search.c Sun Sep 7 22:47:43 2003 *************** *** 2351,2356 **** --- 2355,2366 ---- linenr_T curr; int did_skip; /* TRUE after separating lines have been skipped */ int first; /* TRUE on first line */ + #ifdef FEAT_FOLDING + linenr_T fold_first; /* first line of a closed fold */ + linenr_T fold_last; /* last line of a closed fold */ + int fold_skipped; /* TRUE if a closed fold was skipped this + iteration */ + #endif curr = curwin->w_cursor.lnum; *************** *** 2362,2370 **** --- 2372,2394 ---- if (*ml_get(curr) != NUL) did_skip = TRUE; + #ifdef FEAT_FOLDING + /* skip folded lines */ + fold_skipped = FALSE; + while (hasFolding(curr, &fold_first, &fold_last)) + { + curr = ((dir > 0) ? fold_last : fold_first) + dir; + fold_skipped = TRUE; + } + #endif + if (!first && did_skip && startPS(curr, what, both)) break; + #ifdef FEAT_FOLDING + if (fold_skipped) + curr -= dir; + #endif if ((curr += dir) < 1 || curr > curbuf->b_ml.ml_line_count) { if (count) *** ../vim-6.2.085/src/version.c Thu Sep 11 21:25:44 2003 --- src/version.c Thu Sep 11 21:28:46 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 86, /**/ -- Close your shells, or I'll kill -9 you Tomorrow I'll quota you Remember the disks'll always be full And then while I'm away I'll write ~ everyday And I'll send-pr all my buggings to you. [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ] /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///