diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-19 11:40:17 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-19 11:40:17 +0200 |
| commit | 0fe3b9ea814e195358b6a92b1881d513be9eb4e6 (patch) | |
| tree | 3b6cbbaa96483b6234c7ac2a307f2c17c8de03e9 /plugin | |
| parent | 408444c718477438c65d5b61a05e69e593471d17 (diff) | |
| download | nvim-config-0fe3b9ea814e195358b6a92b1881d513be9eb4e6.tar.gz nvim-config-0fe3b9ea814e195358b6a92b1881d513be9eb4e6.zip | |
fix(nvim): correct tabpage handle vs. number in tabline
vim.t is keyed by tabpage handle while the %nT click region needs the
positional number; the two were swapped, so renames and tab clicks
mis-targeted after :tabmove reordered tabs.
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/50-tabline.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/50-tabline.lua b/plugin/50-tabline.lua index 8628bb2..3369e2a 100644 --- a/plugin/50-tabline.lua +++ b/plugin/50-tabline.lua @@ -36,7 +36,7 @@ function GetTabLine() end local is_current = id == vim.api.nvim_get_current_tabpage() - s = s .. "%" .. id .. "T" + s = s .. "%" .. vim.api.nvim_tabpage_get_number(id) .. "T" local selected_label, modified_label = "▶ ", "[+] " local win_info = ( @@ -53,7 +53,7 @@ function GetTabLine() local total_width = 30 local label_width = total_width - win_info_display_width - local name = vim.t[vim.api.nvim_tabpage_get_number(id)].tabname + local name = vim.t[id].tabname name = ((name ~= nil and name ~= "") and name or tostring(id)) local display_width = vim.fn.strdisplaywidth(name) if display_width > label_width then |
