Only use overbar sign when UI supports it.

Thanks @h3xx.

Closes #471.
This commit is contained in:
Andy Stewart
2018-02-16 13:06:23 +00:00
parent 7e3f41cdec
commit 13361da09e
2 changed files with 17 additions and 4 deletions

View File

@@ -1,3 +1,11 @@
function! gitgutter#utility#supports_overscore_sign()
if s:windows()
return &encoding ==? 'utf-8'
else
return &termencoding ==? &encoding || &termencoding == ''
endif
endfunction
function! gitgutter#utility#setbufvar(buffer, varname, val)
let dict = get(getbufvar(a:buffer, ''), 'gitgutter', {})
let dict[a:varname] = a:val
@@ -201,3 +209,7 @@ function! s:vimdiff(bufnr)
return 0
endif
endfunction
function! s:windows()
return has('win64') || has('win32') || has('win16')
endfunction