summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_breakindent.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-15 18:31:43 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-15 18:31:43 +0000
commit04b871da800768287a8a432de568b11297db8686 (patch)
tree6ab122203671484d74aecdd083174a4268c62d66 /src/testdir/test_breakindent.vim
parente32c3c462ce9b3163a4a4bffd985897910885d29 (diff)
patch 8.2.4100: early return when getting the 'formatlistpat' valuev8.2.4100
Problem: Early return when getting the 'formatlistpat' value. Solution: Remove the first line. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_breakindent.vim')
-rw-r--r--src/testdir/test_breakindent.vim17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim
index 2ac127dd54..6258a7ac5f 100644
--- a/src/testdir/test_breakindent.vim
+++ b/src/testdir/test_breakindent.vim
@@ -890,7 +890,22 @@ func Test_no_extra_indent()
\ "~ ",
\ ]
let lines = s:screen_lines2(1, 4, 20)
- " 3) add something in front, no additional indent
+ " 3) no local formatlist pattern,
+ " so use global one -> indent
+ let g_flp = &g:flp
+ let &g:formatlistpat='^\s*\d\+\.\s\+'
+ let &l:formatlistpat=''
+ let expect = [
+ \ " 1. word word word ",
+ \ " word word word ",
+ \ " word word ",
+ \ "~ ",
+ \ ]
+ let lines = s:screen_lines2(1, 4, 20)
+ call s:compare_lines(expect, lines)
+ let &g:flp = g_flp
+ let &l:formatlistpat='^\s*\d\+\.'
+ " 4) add something in front, no additional indent
norm! gg0
exe ":norm! 5iword \<esc>"
redraw!