From 2d5cba630c13d45e8a0125fe87a7c85b878c0b6f Mon Sep 17 00:00:00 2001 From: watiko Date: Mon, 15 Feb 2016 18:28:39 +0900 Subject: vim-patch:7.4.891 Problem: Indentation of array initializer is wrong. Solution: Avoid that calling find_start_rawstring() changes the position returned by find_start_comment(), add a test. (Hirohito Higashi) https://github.com/vim/vim/commit/089af18d1fd0961ff504ee72db0156bbfe509cdf --- test/functional/legacy/003_cindent_spec.lua | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'test/functional/legacy') diff --git a/test/functional/legacy/003_cindent_spec.lua b/test/functional/legacy/003_cindent_spec.lua index 19694550f4..fbbc05f486 100644 --- a/test/functional/legacy/003_cindent_spec.lua +++ b/test/functional/legacy/003_cindent_spec.lua @@ -919,6 +919,28 @@ describe('cindent', function() )foo"; } + { + int a[4] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + }; + } + + { + a = b[2] + + 3; + } + + { + if (1) + /* aaaaa + * bbbbb + */ + a = 1; + } + /* end of AUTO */ ]=]) @@ -1825,6 +1847,28 @@ describe('cindent', function() )foo"; } + { + int a[4] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + }; + } + + { + a = b[2] + + 3; + } + + { + if (1) + /* aaaaa + * bbbbb + */ + a = 1; + } + /* end of AUTO */ ]=]) end) -- cgit