diff options
-rw-r--r-- | src/edit.c | 3 | ||||
-rw-r--r-- | src/testdir/test_ins_complete.vim | 19 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c index 53e86ff18f..f30edd5c79 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1293,6 +1293,9 @@ docomplete: disable_fold_update--; #endif compl_busy = FALSE; +#ifdef FEAT_SMARTINDENT + can_si = TRUE; // allow smartindenting +#endif break; case Ctrl_Y: // copy from previous line or scroll down diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 3712abe690..75ec03cb37 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -2132,4 +2132,23 @@ func Test_thesaurusfunc_callback() %bw! endfunc +func FooBarComplete(findstart, base) + if a:findstart + return col('.') - 1 + else + return ["Foo", "Bar", "}"] + endif +endfunc + +func Test_complete_smartindent() + new + setlocal smartindent completefunc=FooBarComplete + + exe "norm! o{\<cr>\<c-x>\<c-u>\<c-p>}\<cr>\<esc>" + let result = getline(1,'$') + call assert_equal(['', '{','}',''], result) + bw! + delfunction! FooBarComplete +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 7eec582d98..956100304b 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4710, +/**/ 4709, /**/ 4708, |