From 50577f0186686b404d12157d463fb6bc4abba726 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 3 Apr 2024 11:44:04 +0100 Subject: [PATCH] fix(diffthis): populate b:gitsigns_head Fixes #949 --- lua/gitsigns/diffthis.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/gitsigns/diffthis.lua b/lua/gitsigns/diffthis.lua index afdc734..2795c7b 100644 --- a/lua/gitsigns/diffthis.lua +++ b/lua/gitsigns/diffthis.lua @@ -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 @@ -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)