diff options
| author | Scott Prager <splinterofchaos@gmail.com> | 2014-10-05 23:17:53 -0400 |
|---|---|---|
| committer | Scott Prager <splinterofchaos@gmail.com> | 2014-12-19 18:57:45 -0500 |
| commit | 0eb4c027783804e411d4ae1d1d8db657d6df3211 (patch) | |
| tree | 8d7f7f863be59f456a35160ddb7e68539d9a02c1 /src/nvim/testdir | |
| parent | 12b3f49ea1c5a60e81e445756d1a5a1a850095b0 (diff) | |
| download | rneovim-0eb4c027783804e411d4ae1d1d8db657d6df3211.tar.gz rneovim-0eb4c027783804e411d4ae1d1d8db657d6df3211.tar.bz2 rneovim-0eb4c027783804e411d4ae1d1d8db657d6df3211.zip | |
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
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test3.in | 58 | ||||
| -rw-r--r-- | src/nvim/testdir/test3.ok | 46 |
2 files changed, 54 insertions, 50 deletions
diff --git a/src/nvim/testdir/test3.in b/src/nvim/testdir/test3.in index 287ed8e5b3..7f6d412806 100644 --- a/src/nvim/testdir/test3.in +++ b/src/nvim/testdir/test3.in @@ -1432,7 +1432,7 @@ int main () STARTTEST :set cino=(0,ts -2kdd=][ +2kdd2j=][ ENDTEST void func(int a @@ -1446,7 +1446,7 @@ void func(int a STARTTEST :set cino=(0 -2kdd=][ +2kdd2j=][ ENDTEST void @@ -1461,7 +1461,7 @@ func(int a STARTTEST :set cino& -2kdd=7][ +2kdd2j=7][ ENDTEST void func(void) @@ -1538,7 +1538,7 @@ func6( STARTTEST :set cino& :set cino+=l1 -2kdd=][ +2kdd2j=][ ENDTEST void func(void) @@ -1567,7 +1567,7 @@ break; STARTTEST :set cino& -2kdd=][ +2kdd2j=][ ENDTEST void func(void) @@ -1592,7 +1592,7 @@ void func(void) STARTTEST :set cino& -2kdd=][ +2kdd2j=][ ENDTEST void func(void) @@ -1919,10 +1919,10 @@ ENDTEST JSSTART var foo = [ -1, // indent 8 more +1, 2, 3 -]; // indent 8 less +]; JSEND STARTTEST @@ -1937,7 +1937,7 @@ var foo = [ 1, 2, 3 -]; // indent 16 less +]; } JSEND @@ -1954,6 +1954,8 @@ if (cond && cond) { stmt; } +window.something.left = +(width - 50 + offset) + "px"; var class_name='myclass'; function private_method() { @@ -1969,15 +1971,15 @@ function init(options) { $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', -bar: 2, // indent 8 more -foobar: [ // indent 8 more -1, // indent 8 more -2, // indent 16 more -3 // indent 16 more +bar: 2, +foobar: [ +1, +2, +3 ], -callback: function(){ // indent 8 more -return true; // indent 8 more -} // indent 8 more +callback: function(){ +return true; +} }, options||{})); } @@ -2018,9 +2020,9 @@ $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', bar: 2, foobar: [ -1, // indent 8 more -2, // indent 8 more -3 // indent 8 more +1, +2, +3 ], callback: function(){ return true; @@ -2040,15 +2042,15 @@ JSSTART function init(options) { $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', -bar: 2, // indent 8 more -foobar: [ // indent 8 more -1, // indent 8 more -2, // indent 16 more -3 // indent 16 more +bar: 2, +foobar: [ +1, +2, +3 ], -callback: function(){ // indent 8 more -return true; // indent 8 more -} // indent 8 more +callback: function(){ +return true; +} }, options||{})); } })(jQuery); diff --git a/src/nvim/testdir/test3.ok b/src/nvim/testdir/test3.ok index edd9e236a6..0d0e76fce4 100644 --- a/src/nvim/testdir/test3.ok +++ b/src/nvim/testdir/test3.ok @@ -1707,10 +1707,10 @@ JSEND JSSTART var foo = [ -1, // indent 8 more + 1, 2, 3 - ]; // indent 8 less +]; JSEND @@ -1720,7 +1720,7 @@ function bar() { 1, 2, 3 - ]; // indent 16 less + ]; } JSEND @@ -1732,6 +1732,8 @@ JSSTART cond) { stmt; } + window.something.left = + (width - 50 + offset) + "px"; var class_name='myclass'; function private_method() { @@ -1747,15 +1749,15 @@ JSSTART $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', - bar: 2, // indent 8 more - foobar: [ // indent 8 more - 1, // indent 8 more - 2, // indent 16 more - 3 // indent 16 more + bar: 2, + foobar: [ + 1, + 2, + 3 ], - callback: function(){ // indent 8 more - return true; // indent 8 more - } // indent 8 more + callback: function(){ + return true; + } }, options||{})); } @@ -1791,9 +1793,9 @@ function init(options) { foo: 'bar', bar: 2, foobar: [ - 1, // indent 8 more - 2, // indent 8 more - 3 // indent 8 more + 1, + 2, + 3 ], callback: function(){ return true; @@ -1808,15 +1810,15 @@ JSSTART function init(options) { $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', - bar: 2, // indent 8 more - foobar: [ // indent 8 more - 1, // indent 8 more - 2, // indent 16 more - 3 // indent 16 more + bar: 2, + foobar: [ + 1, + 2, + 3 ], - callback: function(){ // indent 8 more - return true; // indent 8 more - } // indent 8 more + callback: function(){ + return true; + } }, options||{})); } })(jQuery); |