Lech Lorens wrote:
> The items I can't reproduce are:
>
> 'cindent' not correct when 'list' is set. (Zdravi Korusef, 2010 Apr 15)
This is what was reported:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Hi,
I think that cindent functions doesn't behave correctly when 'set list' is used.
Example C++ code:
namespace
{
void foo()
{
clog << __LINE__ << ", " << a << ", " << x << endl;
}
}
now if I use 'gg=G' with 'set nolist', the code is indented correctly.
If I use 'set list' and then 'gg=G', the result is not indented correctly.
namespace
{
void foo()
{
clog << __LINE__ << ", " << a << ", " << x << endl;
}
}
Also this behavior depends on the values of 'shiftwidth' and 'tabstop'.
If they are both =3, this bug occurs.
If they are both =2, this bug does not coccur.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 9 "} else" causes following lines to be indented too much. (Rouben
> Rostamian, 2008 Aug 30)
Description:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The misbehavior of "cindent" described below is present
in stock vim that comes with Ubuntu and Redhat.
I haven't tried it anywhere else.
Ubuntu: vim version 7.1.138
Redhat: vim version 7.0.237
No $HOME/.vimrc or $HOME/.exrc is present in either case.
After starting vim, I enter ":set cindent", then edit
the following C program:
% cat tryme.c
int foo(void)
{
for (int i = 0; i < 4; i++)
if (i == 1)
return 1;
else if (i == 2) {
puts("Hello world");
return 2;
} else
return 3;
puts("this line is indented too far");
return 0;
}
Note the improper indentation of the last two lines of code.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> I suspect they were reported in private email to Bram.
> Bram, can you send any more details about the two?
See above.
> BTW since a few days ago Jean-Rene David had problems with reproducing
> some items from todo.txt would it make sense to create an additional
> directory in the Vim source code very similar to the current testdir but
> with tests that are known to fail? This might help in the future with
> reproducing problems from todo.txt.
>
> Or – since Vim is not hosted on Google Code – we might pe> rhaps switch to
> using its bug tracker?
>
> I'd be happy with any of those.
The problem with bug trackers is that the reports there mostly go
unnoticed. Bug trackers only work when there are a few people actively
looking at them, verifying if bugs can be reproduced, discarding user
errors, etc.
I think it's better for us to have these discussions in the vim-dev
maillist. Then everybody who cares can comment, problems get noticed
and perhaps someone knows a fix. It's also where I sent patches, thus
we can search for problems and solutions in one place.
--
hundred-and-one symptoms of being an internet addict:
67. Your hard drive crashes. You haven't logged in for two hours. You start
to twitch. You pick up the phone and manually dial your ISP's access
number. You try to hum to communicate with the modem. You succeed.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
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