Luc Deschenaux wrote:

> With the patch below the J1 flag for cinoptions is now working as
> mentioned in runtime/docs/indent.txt:
> 
>                 var bar = {
>                     foo: {
>                         that: this,
>                         some: ok,
>                     },
>                     "bar":{
>                         a : 2,
>                         b: "123abc",
>                         x: 4,
>                         "y": 5
>                     }
>                 }
> 
> 
> --- misc1.c.orig    2011-06-09 14:32:21.000000000 +0200
> +++ misc1.c    2011-06-09 14:42:35.000000000 +0200
> @@ -6965,7 +6965,9 @@
>           *            ldfd) {
>           *            }
>           */
> -        if ((ind_keep_case_label
> +        if (ind_js) {
> +        amount = get_indent();
> +        } else if ((ind_keep_case_label
>              &&  cin_iscase(skipwhite(ml_get_curline()), FALSE)))
>          amount = get_indent();
>          else

That appears to work.  Bonus if you can make a test to verify this!
Hmm, there don't seem to be any tests for "J1" in 'cino'.  These would
go in testdir/test3.in.

-- 
Send $25.00 for handy leaflet on how to make money by selling leaflets

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

Raspunde prin e-mail lui