mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Only show intra line highlights in Vim popups when supported
This commit is contained in:
@@ -476,11 +476,13 @@ function! s:populate_hunk_preview_window(header, body)
|
|||||||
if exists('*popup_create')
|
if exists('*popup_create')
|
||||||
call popup_settext(s:winid, a:body)
|
call popup_settext(s:winid, a:body)
|
||||||
|
|
||||||
|
if has('patch-8.1.2071')
|
||||||
for region in gitgutter#diff_highlight#process(a:body)
|
for region in gitgutter#diff_highlight#process(a:body)
|
||||||
let type = region[1] == '+' ? 'gitgutter_add_intra_line' : 'gitgutter_delete_intra_line'
|
let type = region[1] == '+' ? 'gitgutter_add_intra_line' : 'gitgutter_delete_intra_line'
|
||||||
call prop_add(region[0], region[2], {'bufnr': winbufnr(s:winid), 'type': type, 'end_col': region[3]+1})
|
call prop_add(region[0], region[2], {'bufnr': winbufnr(s:winid), 'type': type, 'end_col': region[3]+1})
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
let b:hunk_header = a:header
|
let b:hunk_header = a:header
|
||||||
|
|||||||
Reference in New Issue
Block a user