To: vim-dev@vim.org Subject: Patch 6.0.225 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.225 Problem: In Visual mode "gk" gets stuck in a closed fold. (Srinath Avadhanula) Solution: Behave differently in a closed fold. Files: src/normal.c *** ../vim60.224/src/normal.c Thu Feb 7 12:49:18 2002 --- src/normal.c Sat Feb 16 22:43:41 2002 *************** *** 6699,6706 **** */ case 'j': case K_DOWN: ! /* with 'nowrap' it works just like the normal "j" command */ ! if (!curwin->w_p_wrap) { oap->motion_type = MLINE; i = cursor_down(cap->count1, oap->op_type == OP_NOP); --- 6699,6711 ---- */ case 'j': case K_DOWN: ! /* with 'nowrap' it works just like the normal "j" command; also when ! * in a closed fold */ ! if (!curwin->w_p_wrap ! #ifdef FEAT_FOLDING ! || hasFolding(curwin->w_cursor.lnum, NULL, NULL) ! #endif ! ) { oap->motion_type = MLINE; i = cursor_down(cap->count1, oap->op_type == OP_NOP); *************** *** 6713,6720 **** case 'k': case K_UP: ! /* with 'nowrap' it works just like the normal "k" command */ ! if (!curwin->w_p_wrap) { oap->motion_type = MLINE; i = cursor_up(cap->count1, oap->op_type == OP_NOP); --- 6718,6730 ---- case 'k': case K_UP: ! /* with 'nowrap' it works just like the normal "k" command; also when ! * in a closed fold */ ! if (!curwin->w_p_wrap ! #ifdef FEAT_FOLDING ! || hasFolding(curwin->w_cursor.lnum, NULL, NULL) ! #endif ! ) { oap->motion_type = MLINE; i = cursor_up(cap->count1, oap->op_type == OP_NOP); *** ../vim60.224/src/version.c Sat Feb 16 13:15:21 2002 --- src/version.c Sat Feb 16 15:48:37 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 225, /**/ -- A law to reduce crime states: "It is mandatory for a motorist with criminal intentions to stop at the city limits and telephone the chief of police as he is entering the town. [real standing law in Washington, United States of America] /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///