- setTagView: function () {
- const target = this.currentTag();
- if (!target) return;
- const tag = target.textContent!;
+ setTagView: function (tag: string | null = null) {
+ if (tag === null) {
+ const target = this.currentTag();
+ if (!target) return;
+ tag = target.textContent!;
+ }
if (event.key == "c") return browserUI.setView("cancelled");
if (event.key == "d") return browserUI.setView("done");
if (event.key == "i") return browserUI.setUntaggedView();
if (event.key == "c") return browserUI.setView("cancelled");
if (event.key == "d") return browserUI.setView("done");
if (event.key == "i") return browserUI.setUntaggedView();
if (event.key == "q") return browserUI.setView("todo");
if (event.key == "s") return (inputState = InputState.VS);
if (event.key == "T") return browserUI.resetTagView();
if (event.key == "q") return browserUI.setView("todo");
if (event.key == "s") return (inputState = InputState.VS);
if (event.key == "T") return browserUI.resetTagView();