Nvim: filter empty lines

This commit is contained in:
Marco Hinz 2019-08-14 15:33:45 +02:00
parent b686925732
commit f813d66d47
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -121,7 +121,7 @@ endfunction
" Function: #popup_create {{{1
function! sy#util#popup_create(hunkdiff) abort
let max_height = winheight('%') - winline()
let height = len(a:hunkdiff)
let height = len(filter(a:hunkdiff, {_,v -> !empty(v)}))
let height = (height > max_height) ? max_height : height
let offset = s:offset()