mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.355
Problem: Several problems with Javascript indenting. Solution: Improve Javascript indenting. https://code.google.com/p/vim/source/detail?r=v7-4-355
This commit is contained in:
parent
12b3f49ea1
commit
0eb4c02778
@ -210,9 +210,36 @@ static pos_T *find_line_comment(void) /* XXX */
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Checks if `text` starts with "key:".
|
||||||
* Check if string matches "label:"; move to character after ':' if true.
|
static bool cin_has_js_key(char_u *text)
|
||||||
*/
|
{
|
||||||
|
char_u *s = skipwhite(text);
|
||||||
|
|
||||||
|
char_u quote = 0;
|
||||||
|
if (*s == '\'' || *s == '"') {
|
||||||
|
// can be 'key': or "key":
|
||||||
|
quote = *s;
|
||||||
|
++s;
|
||||||
|
}
|
||||||
|
if (!vim_isIDc(*s)) { // need at least one ID character
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (vim_isIDc(*s)) {
|
||||||
|
++s;
|
||||||
|
}
|
||||||
|
if (*s && *s == quote) {
|
||||||
|
++s;
|
||||||
|
}
|
||||||
|
|
||||||
|
s = cin_skipcomment(s);
|
||||||
|
|
||||||
|
// "::" is not a label, it's C++
|
||||||
|
return (*s == ':' && s[1] != ':');
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Checks if string matches "label:"; move to character after ':' if true.
|
||||||
|
/// "*s" must point to the start of the label, if there is one.
|
||||||
static int cin_islabel_skip(char_u **s)
|
static int cin_islabel_skip(char_u **s)
|
||||||
{
|
{
|
||||||
if (!vim_isIDc(**s)) /* need at least one ID character */
|
if (!vim_isIDc(**s)) /* need at least one ID character */
|
||||||
@ -1201,13 +1228,18 @@ static pos_T *find_start_brace(void)
|
|||||||
/// Find the matching '(', ignoring it if it is in a comment.
|
/// Find the matching '(', ignoring it if it is in a comment.
|
||||||
/// @returns NULL or the found match.
|
/// @returns NULL or the found match.
|
||||||
static pos_T *find_match_paren(int ind_maxparen)
|
static pos_T *find_match_paren(int ind_maxparen)
|
||||||
|
{
|
||||||
|
return find_match_char('(', ind_maxparen);
|
||||||
|
}
|
||||||
|
|
||||||
|
static pos_T * find_match_char(char_u c, int ind_maxparen)
|
||||||
{
|
{
|
||||||
pos_T cursor_save;
|
pos_T cursor_save;
|
||||||
pos_T *trypos;
|
pos_T *trypos;
|
||||||
static pos_T pos_copy;
|
static pos_T pos_copy;
|
||||||
|
|
||||||
cursor_save = curwin->w_cursor;
|
cursor_save = curwin->w_cursor;
|
||||||
if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL) {
|
if ((trypos = findmatchlimit(NULL, c, 0, ind_maxparen)) != NULL) {
|
||||||
/* check if the ( is in a // comment */
|
/* check if the ( is in a // comment */
|
||||||
if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
|
if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
|
||||||
trypos = NULL;
|
trypos = NULL;
|
||||||
@ -1535,6 +1567,8 @@ int get_c_indent(void)
|
|||||||
#define LOOKFOR_NOBREAK 8
|
#define LOOKFOR_NOBREAK 8
|
||||||
#define LOOKFOR_CPP_BASECLASS 9
|
#define LOOKFOR_CPP_BASECLASS 9
|
||||||
#define LOOKFOR_ENUM_OR_INIT 10
|
#define LOOKFOR_ENUM_OR_INIT 10
|
||||||
|
#define LOOKFOR_JS_KEY 11
|
||||||
|
#define LOOKFOR_NO_COMMA 12
|
||||||
|
|
||||||
int whilelevel;
|
int whilelevel;
|
||||||
linenr_T lnum;
|
linenr_T lnum;
|
||||||
@ -1749,6 +1783,12 @@ int get_c_indent(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Are we looking at a ']' that has a match?
|
||||||
|
else if (*skipwhite(theline) == ']'
|
||||||
|
&& (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL) {
|
||||||
|
// align with the line containing the '['.
|
||||||
|
amount = get_indent_lnum(trypos->lnum);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Are we inside parentheses or braces?
|
* Are we inside parentheses or braces?
|
||||||
*/ /* XXX */
|
*/ /* XXX */
|
||||||
@ -1983,13 +2023,10 @@ int get_c_indent(void)
|
|||||||
/* add extra indent for a comment */
|
/* add extra indent for a comment */
|
||||||
if (cin_iscomment(theline))
|
if (cin_iscomment(theline))
|
||||||
amount += curbuf->b_ind_comment;
|
amount += curbuf->b_ind_comment;
|
||||||
}
|
} else {
|
||||||
/*
|
// We are inside braces, there is a { before this line at the position
|
||||||
* Are we at least inside braces, then?
|
// stored in tryposBrace.
|
||||||
*/
|
|
||||||
else {
|
|
||||||
trypos = tryposBrace;
|
trypos = tryposBrace;
|
||||||
|
|
||||||
ourscope = trypos->lnum;
|
ourscope = trypos->lnum;
|
||||||
start = ml_get(ourscope);
|
start = ml_get(ourscope);
|
||||||
|
|
||||||
@ -2008,28 +2045,22 @@ int get_c_indent(void)
|
|||||||
else
|
else
|
||||||
start_brace = BRACE_AT_START;
|
start_brace = BRACE_AT_START;
|
||||||
} else {
|
} else {
|
||||||
/*
|
// That opening brace might have been on a continuation
|
||||||
* that opening brace might have been on a continuation
|
// line. If so, find the start of the line.
|
||||||
* line. if so, find the start of the line.
|
|
||||||
*/
|
|
||||||
curwin->w_cursor.lnum = ourscope;
|
curwin->w_cursor.lnum = ourscope;
|
||||||
|
|
||||||
/*
|
// Position the cursor over the rightmost paren, so that
|
||||||
* position the cursor over the rightmost paren, so that
|
// matching it will take us back to the start of the line.
|
||||||
* matching it will take us back to the start of the line.
|
|
||||||
*/
|
|
||||||
lnum = ourscope;
|
lnum = ourscope;
|
||||||
if (find_last_paren(start, '(', ')')
|
if (find_last_paren(start, '(', ')')
|
||||||
&& (trypos = find_match_paren(curbuf->b_ind_maxparen))
|
&& (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL) {
|
||||||
!= NULL)
|
|
||||||
lnum = trypos->lnum;
|
lnum = trypos->lnum;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
// It could have been something like
|
||||||
* It could have been something like
|
// case 1: if (asdf &&
|
||||||
* case 1: if (asdf &&
|
// ldfd) {
|
||||||
* ldfd) {
|
// }
|
||||||
* }
|
|
||||||
*/
|
|
||||||
if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
|
if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
|
||||||
&& cin_iscase(skipwhite(get_cursor_line_ptr()), FALSE)) {
|
&& cin_iscase(skipwhite(get_cursor_line_ptr()), FALSE)) {
|
||||||
amount = get_indent();
|
amount = get_indent();
|
||||||
@ -2042,11 +2073,12 @@ int get_c_indent(void)
|
|||||||
start_brace = BRACE_AT_END;
|
start_brace = BRACE_AT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// For Javascript check if the line starts with "key:".
|
||||||
* if we're looking at a closing brace, that's where
|
bool js_cur_has_key = curbuf->b_ind_js ? cin_has_js_key(theline) : false;
|
||||||
* we want to be. otherwise, add the amount of room
|
|
||||||
* that an indent is supposed to be.
|
// If we're looking at a closing brace, that's where
|
||||||
*/
|
// we want to be. Otherwise, add the amount of room
|
||||||
|
// that an indent is supposed to be.
|
||||||
if (theline[0] == '}') {
|
if (theline[0] == '}') {
|
||||||
/*
|
/*
|
||||||
* they may want closing braces to line up with something
|
* they may want closing braces to line up with something
|
||||||
@ -2128,14 +2160,12 @@ int get_c_indent(void)
|
|||||||
scope_amount = amount;
|
scope_amount = amount;
|
||||||
whilelevel = 0;
|
whilelevel = 0;
|
||||||
|
|
||||||
/*
|
// Search backwards. If we find something we recognize, line up
|
||||||
* Search backwards. If we find something we recognize, line up
|
// with that.
|
||||||
* with that.
|
//
|
||||||
*
|
// If we're looking at an open brace, indent
|
||||||
* if we're looking at an open brace, indent
|
// the usual amount relative to the conditional
|
||||||
* the usual amount relative to the conditional
|
// that opens the block.
|
||||||
* that opens the block.
|
|
||||||
*/
|
|
||||||
curwin->w_cursor = cur_curpos;
|
curwin->w_cursor = cur_curpos;
|
||||||
for (;; ) {
|
for (;; ) {
|
||||||
curwin->w_cursor.lnum--;
|
curwin->w_cursor.lnum--;
|
||||||
@ -2504,26 +2534,58 @@ int get_c_indent(void)
|
|||||||
*/
|
*/
|
||||||
terminated = cin_isterminated(l, FALSE, TRUE);
|
terminated = cin_isterminated(l, FALSE, TRUE);
|
||||||
|
|
||||||
|
if (js_cur_has_key) {
|
||||||
|
js_cur_has_key = false; // only check the first line
|
||||||
|
if (curbuf->b_ind_js && terminated == ',') {
|
||||||
|
// For Javascript we might be inside an object:
|
||||||
|
// key: something, <- align with this
|
||||||
|
// key: something
|
||||||
|
// or:
|
||||||
|
// key: something + <- align with this
|
||||||
|
// something,
|
||||||
|
// key: something
|
||||||
|
lookfor = LOOKFOR_JS_KEY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lookfor == LOOKFOR_JS_KEY && cin_has_js_key(l)) {
|
||||||
|
amount = get_indent();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (lookfor == LOOKFOR_NO_COMMA) {
|
||||||
|
if (terminated != ',') {
|
||||||
|
// Line below current line is the one that starts a
|
||||||
|
// (possibly broken) line ending in a comma.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
amount = get_indent();
|
||||||
|
if (curwin->w_cursor.lnum - 1 == ourscope) {
|
||||||
|
// line above is start of the scope, thus current line
|
||||||
|
// is the one that stars a (possibly broken) line
|
||||||
|
// ending in a comma.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
|
if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
|
||||||
&& terminated == ',')) {
|
&& terminated == ',')) {
|
||||||
/*
|
// If we're in the middle of a paren thing, Go back to the line
|
||||||
* if we're in the middle of a paren thing,
|
// that starts it so we can get the right prevailing indent
|
||||||
* go back to the line that starts it so
|
// if ( foo &&
|
||||||
* we can get the right prevailing indent
|
// bar )
|
||||||
* if ( foo &&
|
|
||||||
* bar )
|
// Position the cursor over the rightmost paren, so that
|
||||||
*/
|
// matching it will take us back to the start of the line.
|
||||||
/*
|
// Ignore a match before the start of the block.
|
||||||
* position the cursor over the rightmost paren, so that
|
|
||||||
* matching it will take us back to the start of the line.
|
|
||||||
*/
|
|
||||||
(void)find_last_paren(l, '(', ')');
|
(void)find_last_paren(l, '(', ')');
|
||||||
trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
|
trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
|
||||||
|
if (trypos != NULL && (trypos->lnum < tryposBrace->lnum
|
||||||
|
|| (trypos->lnum == tryposBrace->lnum
|
||||||
|
&& trypos->col < tryposBrace->col))) {
|
||||||
|
trypos = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
// If we are looking for ',', we also look for matching
|
||||||
* If we are looking for ',', we also look for matching
|
// braces.
|
||||||
* braces.
|
|
||||||
*/
|
|
||||||
if (trypos == NULL && terminated == ','
|
if (trypos == NULL && terminated == ','
|
||||||
&& find_last_paren(l, '{', '}'))
|
&& find_last_paren(l, '{', '}'))
|
||||||
trypos = find_start_brace();
|
trypos = find_start_brace();
|
||||||
@ -2565,10 +2627,11 @@ int get_c_indent(void)
|
|||||||
* Get indent and pointer to text for current line,
|
* Get indent and pointer to text for current line,
|
||||||
* ignoring any jump label. XXX
|
* ignoring any jump label. XXX
|
||||||
*/
|
*/
|
||||||
if (!curbuf->b_ind_js)
|
if (curbuf->b_ind_js) {
|
||||||
cur_amount = skip_label(curwin->w_cursor.lnum, &l);
|
|
||||||
else
|
|
||||||
cur_amount = get_indent();
|
cur_amount = get_indent();
|
||||||
|
} else {
|
||||||
|
cur_amount = skip_label(curwin->w_cursor.lnum, &l);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* If this is just above the line we are indenting, and it
|
* If this is just above the line we are indenting, and it
|
||||||
* starts with a '{', line it up with this line.
|
* starts with a '{', line it up with this line.
|
||||||
@ -2589,7 +2652,7 @@ int get_c_indent(void)
|
|||||||
if (*skipwhite(l) != '{')
|
if (*skipwhite(l) != '{')
|
||||||
amount += curbuf->b_ind_open_extra;
|
amount += curbuf->b_ind_open_extra;
|
||||||
|
|
||||||
if (curbuf->b_ind_cpp_baseclass) {
|
if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js) {
|
||||||
/* have to look back, whether it is a cpp base
|
/* have to look back, whether it is a cpp base
|
||||||
* class declaration or initialization */
|
* class declaration or initialization */
|
||||||
lookfor = LOOKFOR_CPP_BASECLASS;
|
lookfor = LOOKFOR_CPP_BASECLASS;
|
||||||
@ -2735,17 +2798,43 @@ int get_c_indent(void)
|
|||||||
* yet.
|
* yet.
|
||||||
*/
|
*/
|
||||||
if (lookfor == LOOKFOR_INITIAL && terminated == ',') {
|
if (lookfor == LOOKFOR_INITIAL && terminated == ',') {
|
||||||
lookfor = LOOKFOR_ENUM_OR_INIT;
|
if (curbuf->b_ind_js) {
|
||||||
cont_amount = cin_first_id_amount();
|
// Search for a line ending in a comma
|
||||||
|
// and line up with the line below it
|
||||||
|
// (could be the current line).
|
||||||
|
// some = [
|
||||||
|
// 1, <- line up here
|
||||||
|
// 2,
|
||||||
|
// some = [
|
||||||
|
// 3 + <- line up here
|
||||||
|
// 4 *
|
||||||
|
// 5,
|
||||||
|
// 6,
|
||||||
|
lookfor = LOOKFOR_NO_COMMA;
|
||||||
|
amount = get_indent(); // XXX
|
||||||
|
trypos = find_match_char('[', curbuf->b_ind_maxparen);
|
||||||
|
if (trypos != NULL) {
|
||||||
|
if (trypos->lnum == curwin->w_cursor.lnum - 1) {
|
||||||
|
// Current line is first inside
|
||||||
|
// [], line up with it.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ourscope = trypos->lnum;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lookfor = LOOKFOR_ENUM_OR_INIT;
|
||||||
|
cont_amount = cin_first_id_amount();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (lookfor == LOOKFOR_INITIAL
|
if (lookfor == LOOKFOR_INITIAL
|
||||||
&& *l != NUL
|
&& *l != NUL
|
||||||
&& l[STRLEN(l) - 1] == '\\')
|
&& l[STRLEN(l) - 1] == '\\') {
|
||||||
/* XXX */
|
// XXX
|
||||||
cont_amount = cin_get_equal_amount(
|
cont_amount = cin_get_equal_amount( curwin->w_cursor.lnum);
|
||||||
curwin->w_cursor.lnum);
|
}
|
||||||
if (lookfor != LOOKFOR_TERM)
|
if (lookfor != LOOKFOR_TERM && lookfor != LOOKFOR_JS_KEY) {
|
||||||
lookfor = LOOKFOR_UNTERM;
|
lookfor = LOOKFOR_UNTERM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2754,8 +2843,7 @@ int get_c_indent(void)
|
|||||||
* Check if we are after a while (cond);
|
* Check if we are after a while (cond);
|
||||||
* If so: Ignore until the matching "do".
|
* If so: Ignore until the matching "do".
|
||||||
*/
|
*/
|
||||||
/* XXX */
|
else if (cin_iswhileofdo_end(terminated)) { // XXX
|
||||||
else if (cin_iswhileofdo_end(terminated)) {
|
|
||||||
/*
|
/*
|
||||||
* Found an unterminated line after a while ();, line up
|
* Found an unterminated line after a while ();, line up
|
||||||
* with the last one.
|
* with the last one.
|
||||||
@ -2952,21 +3040,17 @@ term_again:
|
|||||||
if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
|
if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
|
||||||
amount -= curbuf->b_ind_jump_label;
|
amount -= curbuf->b_ind_jump_label;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* ok -- we're not inside any sort of structure at all!
|
|
||||||
*
|
|
||||||
* this means we're at the top level, and everything should
|
|
||||||
* basically just match where the previous line is, except
|
|
||||||
* for the lines immediately following a function declaration,
|
|
||||||
* which are K&R-style parameters and need to be indented.
|
|
||||||
*/
|
|
||||||
else {
|
else {
|
||||||
/*
|
// Ok -- we're not inside any sort of structure at all!
|
||||||
* if our line starts with an open brace, forget about any
|
//
|
||||||
* prevailing indent and make sure it looks like the start
|
// this means we're at the top level, and everything should
|
||||||
* of a function
|
// basically just match where the previous line is, except
|
||||||
*/
|
// for the lines immediately following a function declaration,
|
||||||
|
// which are K&R-style parameters and need to be indented.
|
||||||
|
|
||||||
|
// if our line starts with an open brace, forget about any
|
||||||
|
// prevailing indent and make sure it looks like the start
|
||||||
|
// of a function
|
||||||
if (theline[0] == '{') {
|
if (theline[0] == '{') {
|
||||||
amount = curbuf->b_ind_first_open;
|
amount = curbuf->b_ind_first_open;
|
||||||
}
|
}
|
||||||
@ -3100,6 +3184,15 @@ term_again:
|
|||||||
if (cin_ends_in(l, (char_u *)"};", NULL))
|
if (cin_ends_in(l, (char_u *)"};", NULL))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// If the previous line ends on '[' we are probably in an
|
||||||
|
// array constant:
|
||||||
|
// something = [
|
||||||
|
// 234, <- extra indent
|
||||||
|
if (cin_ends_in(l, (char_u *)"[", NULL)) {
|
||||||
|
amount = get_indent() + ind_continuation;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find a line only has a semicolon that belongs to a previous
|
* Find a line only has a semicolon that belongs to a previous
|
||||||
* line ending in '}', e.g. before an #endif. Don't increase
|
* line ending in '}', e.g. before an #endif. Don't increase
|
||||||
|
@ -1432,7 +1432,7 @@ int main ()
|
|||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
:set cino=(0,ts
|
:set cino=(0,ts
|
||||||
2kdd=][
|
2kdd2j=][
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
void func(int a
|
void func(int a
|
||||||
@ -1446,7 +1446,7 @@ void func(int a
|
|||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
:set cino=(0
|
:set cino=(0
|
||||||
2kdd=][
|
2kdd2j=][
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1461,7 +1461,7 @@ func(int a
|
|||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
:set cino&
|
:set cino&
|
||||||
2kdd=7][
|
2kdd2j=7][
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
void func(void)
|
void func(void)
|
||||||
@ -1538,7 +1538,7 @@ func6(
|
|||||||
STARTTEST
|
STARTTEST
|
||||||
:set cino&
|
:set cino&
|
||||||
:set cino+=l1
|
:set cino+=l1
|
||||||
2kdd=][
|
2kdd2j=][
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
void func(void)
|
void func(void)
|
||||||
@ -1567,7 +1567,7 @@ break;
|
|||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
:set cino&
|
:set cino&
|
||||||
2kdd=][
|
2kdd2j=][
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
void func(void)
|
void func(void)
|
||||||
@ -1592,7 +1592,7 @@ void func(void)
|
|||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
:set cino&
|
:set cino&
|
||||||
2kdd=][
|
2kdd2j=][
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
void func(void)
|
void func(void)
|
||||||
@ -1919,10 +1919,10 @@ ENDTEST
|
|||||||
|
|
||||||
JSSTART
|
JSSTART
|
||||||
var foo = [
|
var foo = [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2,
|
2,
|
||||||
3
|
3
|
||||||
]; // indent 8 less
|
];
|
||||||
JSEND
|
JSEND
|
||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
@ -1937,7 +1937,7 @@ var foo = [
|
|||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
3
|
3
|
||||||
]; // indent 16 less
|
];
|
||||||
}
|
}
|
||||||
JSEND
|
JSEND
|
||||||
|
|
||||||
@ -1954,6 +1954,8 @@ if (cond &&
|
|||||||
cond) {
|
cond) {
|
||||||
stmt;
|
stmt;
|
||||||
}
|
}
|
||||||
|
window.something.left =
|
||||||
|
(width - 50 + offset) + "px";
|
||||||
var class_name='myclass';
|
var class_name='myclass';
|
||||||
|
|
||||||
function private_method() {
|
function private_method() {
|
||||||
@ -1969,15 +1971,15 @@ function init(options) {
|
|||||||
|
|
||||||
$(this).data(class_name+'_public',$.extend({},{
|
$(this).data(class_name+'_public',$.extend({},{
|
||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
bar: 2, // indent 8 more
|
bar: 2,
|
||||||
foobar: [ // indent 8 more
|
foobar: [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2, // indent 16 more
|
2,
|
||||||
3 // indent 16 more
|
3
|
||||||
],
|
],
|
||||||
callback: function(){ // indent 8 more
|
callback: function(){
|
||||||
return true; // indent 8 more
|
return true;
|
||||||
} // indent 8 more
|
}
|
||||||
}, options||{}));
|
}, options||{}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2018,9 +2020,9 @@ $(this).data(class_name+'_public',$.extend({},{
|
|||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
bar: 2,
|
bar: 2,
|
||||||
foobar: [
|
foobar: [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2, // indent 8 more
|
2,
|
||||||
3 // indent 8 more
|
3
|
||||||
],
|
],
|
||||||
callback: function(){
|
callback: function(){
|
||||||
return true;
|
return true;
|
||||||
@ -2040,15 +2042,15 @@ JSSTART
|
|||||||
function init(options) {
|
function init(options) {
|
||||||
$(this).data(class_name+'_public',$.extend({},{
|
$(this).data(class_name+'_public',$.extend({},{
|
||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
bar: 2, // indent 8 more
|
bar: 2,
|
||||||
foobar: [ // indent 8 more
|
foobar: [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2, // indent 16 more
|
2,
|
||||||
3 // indent 16 more
|
3
|
||||||
],
|
],
|
||||||
callback: function(){ // indent 8 more
|
callback: function(){
|
||||||
return true; // indent 8 more
|
return true;
|
||||||
} // indent 8 more
|
}
|
||||||
}, options||{}));
|
}, options||{}));
|
||||||
}
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
@ -1707,10 +1707,10 @@ JSEND
|
|||||||
|
|
||||||
JSSTART
|
JSSTART
|
||||||
var foo = [
|
var foo = [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2,
|
2,
|
||||||
3
|
3
|
||||||
]; // indent 8 less
|
];
|
||||||
JSEND
|
JSEND
|
||||||
|
|
||||||
|
|
||||||
@ -1720,7 +1720,7 @@ function bar() {
|
|||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
3
|
3
|
||||||
]; // indent 16 less
|
];
|
||||||
}
|
}
|
||||||
JSEND
|
JSEND
|
||||||
|
|
||||||
@ -1732,6 +1732,8 @@ JSSTART
|
|||||||
cond) {
|
cond) {
|
||||||
stmt;
|
stmt;
|
||||||
}
|
}
|
||||||
|
window.something.left =
|
||||||
|
(width - 50 + offset) + "px";
|
||||||
var class_name='myclass';
|
var class_name='myclass';
|
||||||
|
|
||||||
function private_method() {
|
function private_method() {
|
||||||
@ -1747,15 +1749,15 @@ JSSTART
|
|||||||
|
|
||||||
$(this).data(class_name+'_public',$.extend({},{
|
$(this).data(class_name+'_public',$.extend({},{
|
||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
bar: 2, // indent 8 more
|
bar: 2,
|
||||||
foobar: [ // indent 8 more
|
foobar: [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2, // indent 16 more
|
2,
|
||||||
3 // indent 16 more
|
3
|
||||||
],
|
],
|
||||||
callback: function(){ // indent 8 more
|
callback: function(){
|
||||||
return true; // indent 8 more
|
return true;
|
||||||
} // indent 8 more
|
}
|
||||||
}, options||{}));
|
}, options||{}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1791,9 +1793,9 @@ function init(options) {
|
|||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
bar: 2,
|
bar: 2,
|
||||||
foobar: [
|
foobar: [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2, // indent 8 more
|
2,
|
||||||
3 // indent 8 more
|
3
|
||||||
],
|
],
|
||||||
callback: function(){
|
callback: function(){
|
||||||
return true;
|
return true;
|
||||||
@ -1808,15 +1810,15 @@ JSSTART
|
|||||||
function init(options) {
|
function init(options) {
|
||||||
$(this).data(class_name+'_public',$.extend({},{
|
$(this).data(class_name+'_public',$.extend({},{
|
||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
bar: 2, // indent 8 more
|
bar: 2,
|
||||||
foobar: [ // indent 8 more
|
foobar: [
|
||||||
1, // indent 8 more
|
1,
|
||||||
2, // indent 16 more
|
2,
|
||||||
3 // indent 16 more
|
3
|
||||||
],
|
],
|
||||||
callback: function(){ // indent 8 more
|
callback: function(){
|
||||||
return true; // indent 8 more
|
return true;
|
||||||
} // indent 8 more
|
}
|
||||||
}, options||{}));
|
}, options||{}));
|
||||||
}
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
@ -382,7 +382,7 @@ static int included_patches[] = {
|
|||||||
358,
|
358,
|
||||||
357,
|
357,
|
||||||
//356 NA
|
//356 NA
|
||||||
//355,
|
355,
|
||||||
//354 NA
|
//354 NA
|
||||||
353,
|
353,
|
||||||
352,
|
352,
|
||||||
|
Loading…
Reference in New Issue
Block a user