Fix moving to floating window

This commit is contained in:
Touko Hallasmaa
2025-03-05 20:59:27 +02:00
committed by Andy Stewart
parent 7b0b5098e3
commit d3a9986fe8

View File

@@ -359,6 +359,11 @@ endfunction
function! s:preview(hunk_diff)
if g:gitgutter_preview_win_floating && exists('*nvim_set_current_win') && s:winid != 0
call nvim_set_current_win(s:winid)
return
endif
let lines = split(a:hunk_diff, '\r\?\n')
let header = lines[0:4]
let body = lines[5:]