comparison src/misc1.c @ 7164:d3c57e7f489a v7.4.893

commit https://github.com/vim/vim/commit/d1b15dec4d00d7ed5e92ff4e0fb7fc2e0818e479 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 13 16:13:39 2015 +0200 patch 7.4.893 Problem: C indenting is wrong below a "case (foo):" because it is recognized as a C++ base class construct. Issue #38. Solution: Check for the case keyword.
author Christian Brabandt <cb@256bit.org>
date Tue, 13 Oct 2015 16:15:05 +0200
parents accd3a0e9bf4
children 41885de3d577
comparison
equal deleted inserted replaced
7163:ef6234bef1de 7164:d3c57e7f489a
6553 --lnum; 6553 --lnum;
6554 } 6554 }
6555 6555
6556 pos->lnum = lnum; 6556 pos->lnum = lnum;
6557 line = ml_get(lnum); 6557 line = ml_get(lnum);
6558 s = cin_skipcomment(line); 6558 s = line;
6559 for (;;) 6559 for (;;)
6560 { 6560 {
6561 if (*s == NUL) 6561 if (*s == NUL)
6562 { 6562 {
6563 if (lnum == curwin->w_cursor.lnum) 6563 if (lnum == curwin->w_cursor.lnum)
6564 break; 6564 break;
6565 /* Continue in the cursor line. */ 6565 /* Continue in the cursor line. */
6566 line = ml_get(++lnum); 6566 line = ml_get(++lnum);
6567 s = line;
6568 }
6569 if (s == line)
6570 {
6571 /* don't recognize "case (foo):" as a baseclass */
6572 if (cin_iscase(s, FALSE))
6573 break;
6567 s = cin_skipcomment(line); 6574 s = cin_skipcomment(line);
6568 if (*s == NUL) 6575 if (*s == NUL)
6569 continue; 6576 continue;
6570 } 6577 }
6571 6578