Yakov Lerner wrote: > I get coredump and repainting problem, > trying to highlight range of lines with :match, as follows: > > vim -u NONE # this is v7.0.222 > :set nocp > :help search() " get some text. the line number is 4078 > :match Search /\%4078l\_.*\%4200l/ > " the range of lines 4078-4200 is highlighted here. So far, so good. > > Now, there are 3 problem here. > 1. > The whole match is not always highlighted: > :set so=999 > :4147 > press UpArrow pressed. > When you pass through the 4078-4100 range, you'll see > that only first line is highlighted. If you press Down now, the > range will be highlighted better. Ctrl-L fixes it. > > 2. > I do not understand why only lines 4078-4102 are highlighted. > Expected: lines 4078-4200 highlighted.
Multi-line matches are not always displayed correctly. A match is searched for in the line where redrawing starts, which can be anywhere. Your pattern only matches when redrawing starts at or before line 4078. I notice this isn't mentioned at ":help :match". I'll add a note. > 3. > If I try pattern > :match Search /\%4078l\(\n\|.\)*\%4200l/ > and scroll down with ArrowDown, > vim crashes with SIGABRT after several presses of ArrowDown. I get "E363: pattern uses more memory than 'maxmempattern'", but also other errors. I'll see if that can be fixed. -- hundred-and-one symptoms of being an internet addict: 1. You actually wore a blue ribbon to protest the Communications Decency Act. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///