-
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
Fixes #798
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,13 +24,14 @@ end | |
local sign_define_cache: {string:table} = {} | ||
local sign_name_cache: {string:string} = {} | ||
|
||
local function get_sign_name(stype: string): string | ||
if not sign_name_cache[stype] then | ||
sign_name_cache[stype] = string.format( | ||
'%s%s', 'GitSigns', capitalise_word(stype)) | ||
local function get_sign_name(name: string, stype: string): string | ||
local key = name..stype | ||
if not sign_name_cache[key] then | ||
sign_name_cache[key] = string.format( | ||
'%s%s%s', 'GitSigns', capitalise_word(key), capitalise_word(stype)) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lewis6991
Author
Owner
|
||
end | ||
|
||
return sign_name_cache[stype] | ||
return sign_name_cache[key] | ||
end | ||
|
||
local function sign_get(name: string): table | ||
|
@@ -57,7 +58,7 @@ local function define_signs(obj: B, redefine: boolean) | |
-- Define signs | ||
for stype, cs in pairs(obj.config) do | ||
local hls = obj.hls[stype] | ||
define_sign(get_sign_name(stype), { | ||
define_sign(get_sign_name(obj.name, stype), { | ||
texthl = hls.hl, | ||
text = config.signcolumn and cs.text or nil, | ||
numhl = config.numhl and hls.numhl or nil, | ||
|
@@ -107,7 +108,7 @@ function M:add(bufnr: integer, signs: {M.Sign}) | |
local to_place = {} | ||
|
||
for _, s in ipairs(signs) do | ||
local sign_name = get_sign_name(s.type) | ||
local sign_name = get_sign_name(self.name, s.type) | ||
|
||
local cs = self.config[s.type] | ||
if config.signcolumn and cs.show_count and s.count then | ||
|
That's a breaking change 😬
Should be marked as such in the commit message maybe?