aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-09-30 21:43:03 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-10-07 17:10:37 +0200
commitc0e45d97b0cbc700cd6f2b9733c15875339262df (patch)
tree0aeb157fe63e37a4128ecc771c376c482bb97473 /test
parent9ad7529f705c883e13fba9a014696fb37318145f (diff)
downloadrneovim-c0e45d97b0cbc700cd6f2b9733c15875339262df.tar.gz
rneovim-c0e45d97b0cbc700cd6f2b9733c15875339262df.tar.bz2
rneovim-c0e45d97b0cbc700cd6f2b9733c15875339262df.zip
vim-patch:8.0.0148 #7344
Problem: When a C preprocessor statement has two line continuations the following line does not have the right indent. (Ken Takata) Solution: Add the indent of the previous continuation line. (Hirohito Higashi) https://github.com/vim/vim/commit/c6aa475a27e3ed1645446b014c32ebf68d005d49
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/003_cindent_spec.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/legacy/003_cindent_spec.lua b/test/functional/legacy/003_cindent_spec.lua
index 202baadd4c..58e87354fb 100644
--- a/test/functional/legacy/003_cindent_spec.lua
+++ b/test/functional/legacy/003_cindent_spec.lua
@@ -4718,4 +4718,38 @@ describe('cindent', function()
JSEND
]=])
end)
+
+ it('line continuations in macros / vim-patch 8.0.0148', function()
+ insert_([=[
+ /* start of define */
+ {
+ }
+ #define AAA \
+ BBB\
+ CCC
+
+ #define CNT \
+ 1 + \
+ 2 + \
+ 4
+ /* end of define */]=])
+
+ feed_command('set cino&')
+ feed_command('/start of define')
+ feed('=/end of define<cr>')
+
+ expect([=[
+ /* start of define */
+ {
+ }
+ #define AAA \
+ BBB\
+ CCC
+
+ #define CNT \
+ 1 + \
+ 2 + \
+ 4
+ /* end of define */]=])
+ end)
end)