feat: make buffer work much better

This commit is contained in:
TJ DeVries
2020-09-11 15:28:32 -04:00
parent a9404201a9
commit f47f1dc037
4 changed files with 27 additions and 7 deletions

View File

@@ -241,6 +241,9 @@ previewers.vimgrep = defaulter(function(_)
local _, _, filename, lnum, col, text = string.find(line, [[([^:]+):(%d+):(%d+):(.*)]])
filename = filename or entry.filename
lnum = lnum or entry.lnum or 0
local context = math.floor(height / 2)
local start = math.max(0, lnum - context)
local finish = lnum + context