Might be related to the other NFA bug reported today.
The below script creates a file with 40 lines of the following format:
  This is line 3 of block 2.
(there are 10 blocks numbered from 0 to 9 with lines from 0 to 3).

It also tries to find all the last lines of the blocks (i.e. lines where 
the following line has a different block number) and put the locations 
into a location list.  The list is empty when re=2.  Obviously, for re=1 
works as expected.

#v+
set re=1
belowright vert split
enew
setl bt=nofile
for i in range(10)
  for j in range(4)
    call append(line('$'), printf('This is line %d of block %d.', j, i))
  endfor
endfor
1del _
normal gg0
let failingSearchPattern = '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
let qf = []
let bufNr = bufnr('%')
while 1
  let lnum = search(failingSearchPattern, 'W')
  if 0 == lnum
    break
  endif
  call add(qf, {'bufnr': bufNr, 'lnum': lnum, 'text': getline(lnum)})
endwhile
let @/ = failingSearchPattern
normal ggn

call setloclist(0, qf)
lopen
#v-

-- 
Lech Lorens

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui