]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0338: Cannot handle mouseclicks in the tabline v9.2.0338
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sat, 11 Apr 2026 15:22:24 +0000 (15:22 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 11 Apr 2026 15:26:14 +0000 (15:26 +0000)
commit0802e00f2a57fb62a0012a2f15a718e72ed806fd
tree726c89dccfab766a263898f00e4a128dc559e8bc
parent8fd37e42a65a36c7e0ea65f73095fa9da89e15e2
patch 9.2.0338: Cannot handle mouseclicks in the tabline

Problem:  Cannot handle mouseclicks in the tabline
Solution: Support %[FuncName] click regions in 'tabline', add "area" key
          to the click info dict (Yasuhiro Matsumoto).

The previous implementation resolved and stored click regions only for
per-window statuslines; the tabline path in win_redr_custom() (wp==NULL)
parsed %[FuncName] but discarded the regions, and tabline clicks were
dispatched via TabPageIdxs[] which didn't know about them.

Add a global tabline_stl_click array populated from the tabline path,
refactor stl_click_handler() to take the regions directly, and dispatch
matching clicks from do_mouse() before falling through to tab selection.
The winid entry in the callback dict is 0 for tabline clicks.

related: #19841
closes:  #19950

Supported by AI.

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/options.txt
src/globals.h
src/mouse.c
src/screen.c
src/testdir/test_statusline.vim
src/version.c