Account for long ns doc strings

This commit is contained in:
Tim Pope 2013-01-09 00:07:24 -05:00
parent fbfc6e09b4
commit 058da0d71c

View File

@ -865,8 +865,8 @@ function! foreplay#ns() abort
while lnum < line('$') && getline(lnum) =~# '^\s*\%(;.*\)\=$'
let lnum += 1
endwhile
let lines = join(getline(lnum, lnum+10), ' ')
let lines = substitute(lines, '"\%(\\.\|[^"]\)*"', '', 'g')
let lines = join(getline(lnum, lnum+50), ' ')
let lines = substitute(lines, '"\%(\\.\|[^"]\)*"\|\\.', '', 'g')
let lines = substitute(lines, '\^\={[^{}]*}', '', '')
let ns = matchstr(lines, '\C^(\s*\%(in-ns\s*''\|ns\s\+\)\zs[A-Za-z0-9_?*!+/=<>.-]\+\ze')
if ns !=# ''