From 9dda8c0868cc7d2a65decf2836778b68b205963e Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Wed, 9 Dec 2020 22:55:27 -0800 Subject: [PATCH] Fix setting `guifontwide` to redraw texts and clear the cache Previously setting `guifontwide` doesn't do anything for drawn text, and you have to set a new `guifont` in order for it to clear. --- src/MacVim/MMCoreTextView.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/MacVim/MMCoreTextView.m b/src/MacVim/MMCoreTextView.m index cc547ce1ba..55c5b04292 100644 --- a/src/MacVim/MMCoreTextView.m +++ b/src/MacVim/MMCoreTextView.m @@ -409,6 +409,12 @@ static void grid_free(Grid *grid) { [fontWide release]; fontWide = [newFont retain]; } + + [self clearAll]; + [fontVariants removeAllObjects]; + [characterStrings removeAllObjects]; + [characterLines removeAllObjects]; + } - (NSFont *)font