Fix matching of var/env against tabs

Fixes #10095
This commit is contained in:
Kovid Goyal
2026-06-01 11:49:45 +05:30
parent 9c7b3d778a
commit 385d90c427
2 changed files with 7 additions and 0 deletions

View File

@@ -184,6 +184,8 @@ Detailed list of changes
- Splits layout: add an ``equalize`` action and an ``equalize_on_close`` option to redistribute split space proportionally (:iss:`3489`)
- Fix matching var/env on tabs not working as expected (:iss:`10095`)
0.47.1 [2026-05-28]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -1084,6 +1084,11 @@ class Tab: # {{{
if w.matches_query(field, query):
return True
return False
case 'var' | 'env':
for w in self:
if w.matches_query(field, query):
return True
return False
case 'index':
if active_tab_manager and len(active_tab_manager.tabs):
idx = (int(query) + len(active_tab_manager.tabs)) % len(active_tab_manager.tabs)