To: vim-dev@vim.org Subject: Patch 6.0.237 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.237 Problem: In a C file, using the filetype plugin, re-indenting a comment with two spaces after the middle "*" doesn't align properly. Solution: Don't use a middle entry from a start/middle/end to line up with the start of the comment when the start part doesn't match with the actual comment start. Files: src/misc1.c *** ../vim60.236/src/misc1.c Tue Feb 12 12:14:36 2002 --- src/misc1.c Mon Feb 18 17:11:41 2002 *************** *** 4890,4895 **** --- 4891,4901 ---- amount = get_indent_lnum(curwin->w_cursor.lnum - 1); break; } + /* If the start comment string doesn't match with the + * start of the comment, skip this entry. XXX */ + else if (STRNCMP(ml_get(trypos->lnum) + trypos->col, + lead_start, lead_start_len) != 0) + continue; } if (start_off != 0) amount += start_off; *** ../vim60.236/src/version.c Mon Feb 18 15:56:19 2002 --- src/version.c Mon Feb 18 17:09:25 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 237, /**/ -- ARTHUR: The swallow may fly south with the sun, or the house martin or the plover seek warmer hot lands in winter, yet these are not strangers to our land. SOLDIER: Are you suggesting coconuts migrate? "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///