On 7 June 2012 16:09, David Pineau <[email protected]> wrote:
> Hello,
>
> While configuring my indentation, I came across a behaviour that seemed
> unintuitive to me (I did not manage to find anything related to this on the
> mailling lists, sorry if I missed it).
>
> When a value in the cinoptions string is described as a shiftwidth value,
> the value cannot be zero.
> This means that if I write "cino=n0s", the indentation behaves as if I wrote
> "cino=n1s".
>
> Reading the code (in the latest vim mercurial trunk), I found that if the
> value and the fraction were equal to 0 when the 's' character is present,
> then the value is set to 1 by default. I am aware that writing "n0s" instead
> of "n0" may be a stretch, but I found this behaviour disturbing.
>
> Is this behaviour intended, or is it a unlucky side-effect of the default 1
> shiftwidth width when only the s is present ?
>
> In the second case, I wrote a little patch that should be easy to apply and
> check (Patch retrieved from a mercurial patch queue), that I will join to my
> next message if you deem it useful :)

Admittedly, I did not read the message carefully. I just fixed it to
find out that you already did that.
Next time just go ahead and attach the patch.

I guess the behaviour is an unintended side-effect so I attach my
version of the patch.
Test 3 updated.

Cheers,
Lech

-- 
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

Attachment: cinoptions-0s.patch
Description: Binary data

Raspunde prin e-mail lui