From 90426e0d996ab98e5b3c0882ec122dc1d7a7ff51 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Sun, 7 Jul 2019 02:52:23 -0700 Subject: [PATCH] Fix MacVim GUI to hard-code sign icon to width of 2 to reduce dependency Prevoiusly the code uses strlen to get the sign icon width but it's always 2 (according to Vim's documentation, see ":h sign-define"), and the function it calls (`sign_get_text`) has been removed from Vim already. Just use the hard-coded 2 for simplicity and reduce dependency. --- src/MacVim/gui_macvim.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MacVim/gui_macvim.m b/src/MacVim/gui_macvim.m index 94da1d7ecd..6f34a47905 100644 --- a/src/MacVim/gui_macvim.m +++ b/src/MacVim/gui_macvim.m @@ -2369,8 +2369,7 @@ if (!imgName) return; - char_u *txt = sign_get_text(typenr); - int txtSize = txt ? strlen((char*)txt) : 2; + const int txtSize = 2; // This is specified in the docs, and is expected to always be the case. [[MMBackend sharedInstance] drawSign:imgName atRow:row