Skip to content

Commit 027c687

Browse files
committed
Fix getfontname()
1 parent 324a552 commit 027c687

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MacVim/gui_macvim.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,12 +953,12 @@
953953
#if defined(FEAT_EVAL) || defined(PROTO)
954954
/*
955955
* Return the name of font "font" in allocated memory.
956-
* TODO: use 'font' instead of 'name'?
957956
*/
958957
char_u *
959958
gui_mch_get_fontname(GuiFont font, char_u *name)
960959
{
961-
return name ? vim_strsave(name) : NULL;
960+
return font ? [(NSString *)font vimStringSave]
961+
: (name ? vim_strsave(name) : NULL);
962962
}
963963
#endif
964964

0 commit comments

Comments
 (0)