[vim/vim] gvim 9.2.1037 my toolbar plugin icons don't dispaly (Issue #21246)

17 views
Skip to first unread message

Francis Grizzly Smit

unread,
Sep 7, 2026, 6:48:58 PM (3 days ago) Sep 7
to vim/vim, Subscribed
grizzlysmit created an issue (vim/vim#21246)

Steps to reproduce

pull current version of vim on git hub configure for Gtk4 and compile then use
full steps

git pull


./configure --disable-darwin --enable-luainterp=dynamic --enable-mzschemeinterp --enable-perlinterp=yes --enable-python3interp=yes --enable-python3interp=yes --enable-tclinterp=yes --enable-rubyinterp=yes --enable-terminal --enable-autoservername --enable-socketserver --enable-multibyte --enable-fontset --enable-wayland-focus-steal --enable-gui=gtk4 --enable-gpm=yes  --with-wayland --with-gnome --enable-year2038 --enable-gnome-check --with-vim-name=gvim --with-compiledby="Francis Grizzly Smit" --with-features=huge --with-lua-prefix=/usr --enable-fail-if-missing --enable-cscope --enable-gtk4-check --enable-gnome-check --enable-socketserver --enable-autoservername --with-python3-command=/usr/bin/python --with-luajit


make


sudo make install .

then gvim -p files

Expected behaviour

I expected my icons defined in my plugin to display

Version of Vim

VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Sep 8 2026 05:29:14) Included patches: 1-1037 I compiled it myself

Environment

OS environment: No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 26.04.1 LTS
Release: 26.04
Codename: resolute
running gnome 50.1 on Wayland
terminal = term I am using gvim but I use terminator and gnome-trerminal
shell = BASH

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246@github.com>

Christian Brabandt

unread,
Sep 8, 2026, 7:55:56 AM (2 days ago) Sep 8
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21246)

Please be precise, I cannot make sense out of this:

I expected my icons defined in my plugin to display

What does it mean? Where should those icons be displayed? Where did you place your icons? Does it work with GTK3?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5584727339@github.com>

Francis Grizzly Smit

unread,
Sep 8, 2026, 4:24:39 PM (2 days ago) Sep 8
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

Please be precise, I cannot make sense out of this:

I expected my icons defined in my plugin to display

What does it mean? Where should those icons be displayed? Where did you place your icons? Does it work with GTK3?

on the GVim toolbar, and yes this works fine under GTK3, but GTK3 lacks the print dialogue and is way old compared to GTK4


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5591372048@github.com>

Foxe Chen

unread,
Sep 8, 2026, 4:51:28 PM (2 days ago) Sep 8
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#21246)

Can you provide a script to reproduce this issue?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5591685417@github.com>

Francis Grizzly Smit

unread,
Sep 8, 2026, 10:30:43 PM (2 days ago) Sep 8
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

Can you provide a script to reproduce this issue?

yes

function! Joinpath(a, ...) 
    if has('win32') || has('win64') || has('win32unix')
       let pathsep = '\'
    else
       let pathsep = '/'
    endif
    let path = a:a
    for b in a:000
        if b =~# pathsep
            let path = b
        elseif path ==# '' || path =~# pathsep .'$'
            let path .= b
        else
            let path .= pathsep . b
        endif
    endfor
    return path
endfunction

function! PosixPath(sPath) 
    if has('win32') || has('win64') || has('win32unix')
        return substitute(a:sPath, '\', '/', 'g')
    else
        return a:sPath
    endif
endfunction

let tabstuf_dir = Joinpath(fnamemodify(fnamemodify(s:sfile, ':h'), ':h'), '_tabstuff')

let rtp_bak = &runtimepath
let &runtimepath = PosixPath(tabstuf_dir) . ',' . &runtimepath

tmenu ToolBar.CreateInNewTab Create File In New Tab
anoremenu <silent>  icon=create-in-tabs 1.16 ToolBar.CreateInNewTab :call TabNewFile()<cr>
anoremenu <silent>  icon=/home/grizzlysmit/.vim/bundle/tabstuff.vim/_tabstuff/bitmaps/create-in-tabs.xpm 1.16 echo 'hello'<cr>

the first fails the second works so it has to do with the runtimepath parameter


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5594864970@github.com>

Foxe Chen

unread,
Sep 8, 2026, 10:33:15 PM (2 days ago) Sep 8
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#21246)

So is this a problem with the runtimepath option or a problem with the GTK4 toolbar?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5594886160@github.com>

Francis Grizzly Smit

unread,
Sep 8, 2026, 10:33:52 PM (2 days ago) Sep 8
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

yes


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5594890802@github.com>

Francis Grizzly Smit

unread,
Sep 8, 2026, 10:35:07 PM (2 days ago) Sep 8
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

it works in GTK3


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5594900277@github.com>

Francis Grizzly Smit

unread,
Sep 8, 2026, 10:36:33 PM (2 days ago) Sep 8
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

I need runtimepath to work as I cannot put absolute paths in the plugin


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5594911858@github.com>

Francis Grizzly Smit

unread,
Sep 8, 2026, 10:38:03 PM (2 days ago) Sep 8
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

I am the author of the tabstuff plugin


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5594922813@github.com>

Francis Grizzly Smit

unread,
Sep 8, 2026, 10:41:21 PM (2 days ago) Sep 8
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

from the help for the icon parameter of anoremenu command

The toolbar is defined as a special menu called ToolBar, which only has one
level.  Vim interprets the items in this menu as follows:
1)  If an "icon=" argument was specified, the file with this name is used.
    The file can either be specified with the full path or with the base name.
    In the last case it is searched for in the "bitmaps" directory in
    'runtimepath', like in point 3.  Examples: >
	:amenu icon=/usr/local/pixmaps/foo_icon.xpm ToolBar.Foo :echo "Foo"<CR>
	:amenu icon=FooIcon ToolBar.Foo :echo "Foo"<CR>
<   Note that in the first case the extension is included, while in the second
    case it is omitted.
    If the file cannot be opened the next points are tried.
    A space in the file name must be escaped with a backslash.
    A menu priority must come _after_ the icon argument: >
	:amenu icon=foo 1.42 ToolBar.Foo :echo "42!"<CR>
2)  An item called 'BuiltIn##', where ## is a number, is taken as number ## of
    the built-in bitmaps available in Vim.  Currently there are 31 numbered
    from 0 to 30 which cover most common editing operations |builtin-tools|. >
	:amenu ToolBar.BuiltIn22 :call SearchNext("back")<CR>
3)  An item with another name is first searched for in the directory
    "bitmaps" in 'runtimepath'.  If found, the bitmap file is used as the
    toolbar button image.  Note that the exact filename is OS-specific: For
    example, under Win32 the command >
	:amenu ToolBar.Hello :echo "hello"<CR>
<   would find the file 'hello.bmp'.  Under GTK+/X11 it is 'Hello.xpm'.  With
    GTK+ 2 the files 'Hello.png', 'Hello.xpm' and 'Hello.bmp' are checked for
    existence, and the first one found would be used.
    For MS-Windows and GTK+ 2 the bitmap is scaled to fit the button.  For
    MS-Windows a size of 18 by 18 pixels works best.
    For MS-Windows the bitmap should have 16 colors with the standard palette.
    The light grey pixels will be changed to the Window frame color and the
    dark grey pixels to the window shadow color.  More colors might also work,
    depending on your system.
4)  If the bitmap is still not found, Vim checks for a match against its list
    of built-in names.  Each built-in button image has a name.
    So the command >
	:amenu ToolBar.Open :e
<   will show the built-in "open a file" button image if no open.bmp exists.
    All the built-in names can be seen used in menu.vim.
5)  If all else fails, a blank, but functioning, button is displayed.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5594947094@github.com>

Christian Brabandt

unread,
Sep 9, 2026, 3:50:49 AM (yesterday) Sep 9
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21246)

Did you use xpm icons? I think those are no longer supported


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5598210216@github.com>

Francis Grizzly Smit

unread,
Sep 9, 2026, 8:21:32 AM (yesterday) Sep 9
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

I also use bmp's and png's bmp's at least are still which are supported still I think


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5601728575@github.com>

Francis Grizzly Smit

unread,
Sep 9, 2026, 8:38:39 AM (24 hours ago) Sep 9
to vim/vim, Subscribed
grizzlysmit left a comment (vim/vim#21246)

I have converted all xpm's to bmp's to test makes no difference
Just converted all to png's as well no difference


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21246/5601944755@github.com>

Reply all
Reply to author
Forward
0 new messages