diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-11-08 04:30:20 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-11-08 04:30:20 +0100 |
commit | 8050efa07d7a66e8e2e88253d079a106a7f2601a (patch) | |
tree | 237a229f5815f2a54523b6122691b52dd2d0cadb /src/testdir/test101.in | |
parent | e5878f4be9f0cb6719220fa17f113fa24b1f3039 (diff) |
updated for version 7.4.079v7.4.079
Problem: A script cannot detect whether 'hlsearch' highlighting is actually
displayed.
Solution: Add the "v:hlsearch" variable. (ZyX)
Diffstat (limited to 'src/testdir/test101.in')
-rw-r--r-- | src/testdir/test101.in | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/testdir/test101.in b/src/testdir/test101.in new file mode 100644 index 0000000000..04c934f2c5 --- /dev/null +++ b/src/testdir/test101.in @@ -0,0 +1,45 @@ +Test for v:hlsearch vim: set ft=vim : + +STARTTEST +:" Last abc: Q +:so small.vim +:new +:call setline(1, repeat(['aaa'], 10)) +:set hlsearch nolazyredraw +:let r=[] +:command -nargs=0 -bar AddR :call add(r, [screenattr(1, 1), v:hlsearch]) +/aaa +:AddR +:nohlsearch +:AddR +:let v:hlsearch=1 +:AddR +:let v:hlsearch=0 +:AddR +:set hlsearch +:AddR +:let v:hlsearch=0 +:AddR +n:AddR +:let v:hlsearch=0 +:AddR +/ +:AddR +:let r1=r[0][0] +:" I guess it is not guaranteed that screenattr outputs always the same character +:call map(r, 'v:val[1].":".(v:val[0]==r1?"highlighted":"not highlighted")') +:try +: let v:hlsearch=[] +:catch +: call add(r, matchstr(v:exception,'^Vim(let):E\d\+:')) +:endtry +:bwipeout! +:$put=r +:call garbagecollect(1) +:" +:/^start:/,$wq! test.out +:" vim: et ts=4 isk-=\: +:call getchar() +ENDTEST + +start: |