mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
Improve Javascript indenting. Add "J" flag to 'cino'. (Hari Kumar G)
This commit is contained in:
@@ -7545,7 +7545,8 @@ in_cinkeys(keytyped, when, line_is_empty)
|
||||
if (try_match && keytyped == ':')
|
||||
{
|
||||
p = ml_get_curline();
|
||||
if (cin_iscase(p) || cin_isscopedecl(p) || cin_islabel(30))
|
||||
if (cin_iscase(p, FALSE) || cin_isscopedecl(p)
|
||||
|| cin_islabel(30))
|
||||
return TRUE;
|
||||
/* Need to get the line again after cin_islabel(). */
|
||||
p = ml_get_curline();
|
||||
@@ -7554,7 +7555,7 @@ in_cinkeys(keytyped, when, line_is_empty)
|
||||
&& p[curwin->w_cursor.col - 2] == ':')
|
||||
{
|
||||
p[curwin->w_cursor.col - 1] = ' ';
|
||||
i = (cin_iscase(p) || cin_isscopedecl(p)
|
||||
i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
|
||||
|| cin_islabel(30));
|
||||
p = ml_get_curline();
|
||||
p[curwin->w_cursor.col - 1] = ':';
|
||||
|
Reference in New Issue
Block a user