From 69760db5263b62d36884b861e510a299e3fd36dc Mon Sep 17 00:00:00 2001 From: Hawtian Wang Date: Sun, 26 Nov 2023 21:05:49 +0800 Subject: [PATCH] fix! --- lua/ht/version.lua | 2 +- src/conf/ui/right-click.ts | 5 ++++- tsconfig.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/ht/version.lua b/lua/ht/version.lua index 5d2f2a45..00889ac7 100644 --- a/lua/ht/version.lua +++ b/lua/ht/version.lua @@ -1,5 +1,5 @@ local M = {} -M.last_updated_time = '2023.11.25' +M.last_updated_time = '2023.11.26' return M diff --git a/src/conf/ui/right-click.ts b/src/conf/ui/right-click.ts index 05cfce46..0bed974e 100644 --- a/src/conf/ui/right-click.ts +++ b/src/conf/ui/right-click.ts @@ -93,12 +93,15 @@ function filterMenuItems(buffer: VimBuffer, items: MenuItem[]): MenuItem[] { v.children = clearContiguousSeparators( filterMenuItems(buffer, v.children) ); + if (v.children.length === 0) { + return false; + } } return true; }) ); // clear last separator - if (ret[ret.length - 1].text.isSeparator()) { + if (ret.length > 0 && ret[ret.length - 1].text.isSeparator()) { ret.pop(); } return ret; diff --git a/tsconfig.json b/tsconfig.json index bb200d43..957189e2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,7 @@ }, "tstl": { "luaTarget": "JIT", - "sourceMapTraceback": false, + "sourceMapTraceback": true, "tstlVerbose": false, "noImplicitSelf": true, "luaPlugins": [