Mercurial > vim
view src/testdir/test101.in @ 8907:5deb9e8f4292 v7.4.1740
commit https://github.com/vim/vim/commit/4d585022023b96f6507e8cae5ed8fc8d926f5140
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 14 19:50:22 2016 +0200
patch 7.4.1740
Problem: syn-cchar defined with matchadd() does not appear if there are no
other syntax definitions which matches buffer text.
Solution: Check for startcol. (Ozaki Kiichi, haya14busa, closes https://github.com/vim/vim/issues/757)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 14 Apr 2016 20:00:07 +0200 |
parents | 01c668384bcc |
children |
line wrap: on
line source
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 :set nohls / :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: