macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.47k stars 680 forks source link

GUI tabs broken in the latest release #1461

Closed emancu closed 7 months ago

emancu commented 7 months ago

Steps to reproduce

  1. Start Macvim with the GUI enabled.
  2. Run :set showtabline=2 to always display the Tabs
  3. Run :set guioptions+=e to use the GUI tabs

Expected behaviour

Render the buffer and use vim as always.

Version of Vim and architecture

VIM 9.0 patches: 1-1897, Huge version with MacVim GUI, Compiled by Homebrew.

Environment

macOS Sonoma 14.1.1 (23B81), arm64

$ uname -a
Darwin eprof.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64
:version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 12 2023 07:45:46)
macOS version - arm64
Included patches: 1-1897
Compiled by Homebrew
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl               +cmdline_hist      +ex_extra          +job               +mouseshape        +packages          +signs             +terminfo          +visualextra
+arabic            +cmdline_info      +extra_search      +jumplist          +mouse_dec         +path_extra        +smartindent       +termresponse      +vreplace
+autocmd           +comments          -farsi             +keymap            -mouse_gpm         +perl              +sodium            +textobjects       +wildignore
+autochdir         +conceal           +file_in_path      +lambda            -mouse_jsbterm     +persistent_undo   +sound             +textprop          +wildmenu
-autoservername    +cryptv            +find_in_path      +langmap           +mouse_netterm     +popupwin          +spell             +timers            +windows
+balloon_eval      +cscope            +float             +libcall           +mouse_sgr         +postscript        +startuptime       +title             +writebackup
+balloon_eval_term +cursorbind        +folding           +linebreak         -mouse_sysmouse    +printer           +statusline        +toolbar           -X11
+browse            +cursorshape       -footer            +lispindent        +mouse_urxvt       +profile           -sun_workshop      +transparency      -xfontset
++builtin_terms    +dialog_con_gui    +fork()            +listcmds          +mouse_xterm       -python            +syntax            +user_commands     +xim
+byte_offset       +diff              +fullscreen        +localmap          +multi_byte        +python3           +tag_binary        +vartabs           -xpm
+channel           +digraphs          +gettext           +lua               +multi_lang        +quickfix          -tag_old_static    +vertsplit         -xsmp
+cindent           +dnd               -hangul_input      +menu              -mzscheme          +reltime           -tag_any_white     +vim9script        -xterm_clipboard
+clientserver      -ebcdic            +iconv             +mksession         +netbeans_intg     +rightleft         +tcl               +viminfo           -xterm_save
+clipboard         +emacs_tags        +insert_expand     +modify_fname      +num64             +ruby              +termguicolors     +virtualedit
+cmdline_compl     +eval              +ipv6              +mouse             +odbeditor         +scrollbind        +terminal          +visual
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2 -arch arm64 -D_REENTRANT -U_FORTIFY_SOURCE -D
_FORTIFY_SOURCE=1
Linking: clang -arch arm64 -L/opt/homebrew/lib -o Vim -lm -lncurses /opt/homebrew/lib/libsodium.a -liconv /opt/homebrew/lib/libintl.a -framework AppKit -L/opt/homebrew/opt/lua/lib
-llua5.4 -L/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/config-3.11-dar
win -lpython3.11 -framework CoreFoundation -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -lruby.3.2 -L/opt/homebrew/Cellar/ruby/3.2.2_1/lib

https://github.com/macvim-dev/macvim/assets/56375/60fe3b08-4e82-4827-b7c1-3cd87328803a

How MacVim was installed

Homebrew

Logs and stack traces

No response

Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration

Issue has been tested with no configuration

Other conditions

ychin commented 7 months ago

This is because Homebrew is building MacVim with the macOS 14 Sonoma SDK before all the issues were fixed. The official MacVim binary release for r178 was still built using macOS 13 SDK. Issues like this is why I usually recommend getting the official binary release instead of the Homebrew one as it's fully tested and controlled by MacVim team.

This specific issue was fixed in #1440, which was only released for 178.1 (pre-release build) and slated for r179.

I'm not sure if Homebrew has an option for building using an older SDK. If you want this fixed now, you can download the official binary release for r178. Otherwise, you can wait for r179, which should be out in less than 1 month.

Closing this issue because it's really just a Homebrew packaging issue, with alternative solutions for a temporary fix.

Note: If you prefer using command-line, using brew cask to install MacVim will work too as that just installs the official binary release for you instead of you needing to navigate to it and downloading it yourself. It's actually kind of uncommon for a package to both have a Homebrew formula and a Homebrew cask formula, and I think it's only this way due to historical reasons.

emancu commented 7 months ago

Thanks @ychin for the fantastic explanation, and solution -- much appreciated.