Skip to content

Commit

Permalink
Set filetype in :GitGutterDiffOrig
Browse files Browse the repository at this point in the history
Closes airblade#833.
  • Loading branch information
airblade committed May 4, 2022
1 parent 988a6db commit 719d4ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autoload/gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,11 @@ endfunction
function! gitgutter#difforig()
let bufnr = bufnr('')
let path = gitgutter#utility#repo_path(bufnr, 1)
let filetype = &filetype

vertical new
set buftype=nofile
let &filetype = filetype

if g:gitgutter_diff_relative_to ==# 'index'
let index_name = gitgutter#utility#get_diff_base(bufnr).':'.path
Expand Down

0 comments on commit 719d4ec

Please sign in to comment.