Skip to content

Commit

Permalink
fix(diffthis): populate b:gitsigns_head
Browse files Browse the repository at this point in the history
Fixes #949
  • Loading branch information
lewis6991 committed Apr 3, 2024
1 parent 690f298 commit 50577f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/gitsigns/diffthis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local cache = require('gitsigns.cache').cache
local util = require('gitsigns.util')
local manager = require('gitsigns.manager')
local message = require('gitsigns.message')
local Status = require('gitsigns.status')

local throttle_by_id = require('gitsigns.debounce').throttle_by_id

Expand Down Expand Up @@ -38,6 +39,7 @@ local function bufread(bufnr, dbufnr, base)

local modifiable = vim.bo[dbufnr].modifiable
vim.bo[dbufnr].modifiable = true
Status:update(dbufnr, {head = comp_rev})

util.set_lines(dbufnr, 0, -1, text)

Expand Down

0 comments on commit 50577f0

Please sign in to comment.