Skip to content

Commit

Permalink
Merge pull request #76 from kamecha/fix/reload_activity
Browse files Browse the repository at this point in the history
アクティビティでリロードするとエラるのを修正
  • Loading branch information
kamecha authored Mar 14, 2024
2 parents 135a221 + b02a1cf commit d0b264c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions denops/traqvim/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,14 @@ export async function main(denops: Denops) {
// バッファ番号は被らないが、バッファ名は被る可能性がある
ensureNumber(bufNum);
ensureString(bufName);
if (bufName === "Activity") {
const bufnameParsed = bufname.parse(bufName);
if (bufnameParsed.expr === "/Activity") {
actionOpenActivity(denops, bufNum);
} else {
// バッファが"#gps/times/kamecha(1)"のように"(1)"がついている場合、
// それを削除する
const bufNameWithoutNumber = bufName.replace(/\(\d+\)$/, "");
const bufNameWithoutNumber =
bufnameParsed.fragment?.replace(/\(\d+\)$/, "") || "";
const channelID = await vars.buffers.get(denops, "channelID");
ensureString(channelID);
const limit = await vars.globals.get(denops, "traqvim#fetch_limit");
Expand Down

0 comments on commit d0b264c

Please sign in to comment.