Skip to content

Commit 90426e0

Browse files
committed
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.
1 parent c222e33 commit 90426e0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/MacVim/gui_macvim.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,8 +2369,7 @@
23692369
if (!imgName)
23702370
return;
23712371

2372-
char_u *txt = sign_get_text(typenr);
2373-
int txtSize = txt ? strlen((char*)txt) : 2;
2372+
const int txtSize = 2; // This is specified in the docs, and is expected to always be the case.
23742373

23752374
[[MMBackend sharedInstance] drawSign:imgName
23762375
atRow:row

0 commit comments

Comments
 (0)