coc-git 2.4.4 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +11 -6
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -6596,7 +6596,7 @@ var GitBuffer = class {
|
|
|
6596
6596
|
}
|
|
6597
6597
|
async showBlameInfo(lnum) {
|
|
6598
6598
|
let {nvim} = import_coc11.workspace;
|
|
6599
|
-
let {virtualTextSrcId} = this.config;
|
|
6599
|
+
let {virtualTextSrcId, addGBlameToBufferVar, addGBlameToVirtualText} = this.config;
|
|
6600
6600
|
if (!this.showBlame)
|
|
6601
6601
|
return;
|
|
6602
6602
|
let infos = this.blameInfo;
|
|
@@ -6616,19 +6616,24 @@ var GitBuffer = class {
|
|
|
6616
6616
|
let buffer = nvim.createBuffer(this.doc.bufnr);
|
|
6617
6617
|
let hide_blame = await nvim.getVar("coc_git_hide_blame_virtual_text");
|
|
6618
6618
|
if (hide_blame) {
|
|
6619
|
-
const prefix = this.config.virtualTextPrefix;
|
|
6620
6619
|
await buffer.request("nvim_buf_clear_namespace", [virtualTextSrcId, 0, -1]);
|
|
6621
6620
|
} else {
|
|
6622
|
-
if (
|
|
6621
|
+
if (addGBlameToBufferVar) {
|
|
6623
6622
|
nvim.pauseNotification();
|
|
6624
6623
|
buffer.setVar("coc_git_blame", blameText, true);
|
|
6625
6624
|
nvim.call("coc#util#do_autocmd", ["CocGitStatusChange"], true);
|
|
6626
6625
|
nvim.resumeNotification(false, true);
|
|
6627
6626
|
}
|
|
6628
|
-
if (
|
|
6627
|
+
if (addGBlameToVirtualText) {
|
|
6629
6628
|
const prefix = this.config.virtualTextPrefix;
|
|
6630
|
-
await buffer.
|
|
6631
|
-
|
|
6629
|
+
await buffer.clearNamespace(virtualTextSrcId);
|
|
6630
|
+
if (import_coc11.workspace.has("nvim-0.6.0")) {
|
|
6631
|
+
await buffer.setExtMark(virtualTextSrcId, lnum - 1, 0, {
|
|
6632
|
+
virt_text: [[prefix + blameText, "CocCodeLens"]]
|
|
6633
|
+
});
|
|
6634
|
+
} else {
|
|
6635
|
+
await buffer.setVirtualText(virtualTextSrcId, lnum - 1, [[prefix + blameText, "CocCodeLens"]]);
|
|
6636
|
+
}
|
|
6632
6637
|
}
|
|
6633
6638
|
}
|
|
6634
6639
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coc-git",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
4
4
|
"description": "Git extension for coc.nvim",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"publisher": "chemzqm",
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
"@types/node": "^12.12.0",
|
|
356
356
|
"@types/uuid": "^7.0.1",
|
|
357
357
|
"@types/which": "^1.3.2",
|
|
358
|
-
"coc.nvim": "^0.0.81-next.
|
|
358
|
+
"coc.nvim": "^0.0.81-next.9",
|
|
359
359
|
"colors": "^1.4.0",
|
|
360
360
|
"debounce": "^1.2.0",
|
|
361
361
|
"esbuild": "^0.8.29",
|