To: vim-dev@vim.org Subject: Patch 6.1.020 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.020 Problem: col("'>") returns a huge number after using Visual line mode. Solution: Return the length of the line instead. Files: src/eval.c *** ../vim61.019/src/eval.c Tue Mar 12 17:59:58 2002 --- src/eval.c Sun Apr 21 15:41:37 2002 *************** *** 3096,3102 **** if (fp != NULL) { if (fp->col == MAXCOL) ! col = MAXCOL; else { col = fp->col + 1; --- 3096,3108 ---- if (fp != NULL) { if (fp->col == MAXCOL) ! { ! /* '> can be MAXCOL, get the length of the line then */ ! if (fp->lnum <= curbuf->b_ml.ml_line_count) ! col = STRLEN(ml_get(fp->lnum)) + 1; ! else ! col = MAXCOL; ! } else { col = fp->col + 1; *** ../vim61.019/src/version.c Sat Apr 20 21:50:49 2002 --- src/version.c Sun Apr 21 15:44:16 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 20, /**/ -- hundred-and-one symptoms of being an internet addict: 262. Your computer has it's own phone line - but your daughter doesn't. /// 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 ///