Given the file foo.cc

-- >8 --
class a {
        public:
                a() : i(0)
                {
                }

                a()
                        : i(0)
                {
                }

                a() : i(0) {
                }
};
-- 8< --

Performing '=G' from line 1 results in

-- >8 --
class a {
        public:
                a() : i(0)
        {
        }

                a()
                        : i(0)
                {
                }

                a() : i(0) {
                }
};
-- 8< --

The block of the constructor on line 3 gets dedented when it shouldn't.
The backtracking to find the start of the constructor, so it can be used
as the basis for indenting the block, finds the scope declaration and
keys off of that instead.

The cindent code is pretty hairy.  I wasn't able to find an obvious fix.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@jamessan.com>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Digital signature

Reply via email to