From 7885718d426ada255f045a55b3ad0b7a421ebe00 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 18 Oct 2020 11:48:38 +1100 Subject: [PATCH] Disable annoying smart quotes --- v2/internal/ffenestri/ffenestri_darwin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2/internal/ffenestri/ffenestri_darwin.c b/v2/internal/ffenestri/ffenestri_darwin.c index 5ec058b27..22c9e4c7b 100644 --- a/v2/internal/ffenestri/ffenestri_darwin.c +++ b/v2/internal/ffenestri/ffenestri_darwin.c @@ -942,6 +942,11 @@ void Run(struct Application *app, int argc, char **argv) { CGRect contentViewBounds = GET_BOUNDS(contentView); msg(wkwebview, s("setFrame:"), contentViewBounds ); + // Disable damn smart quotes + // Credit: https://stackoverflow.com/a/31640511 + id userDefaults = msg(c("NSUserDefaults"), s("standardUserDefaults")); + msg(userDefaults, s("setBool:forKey:"), NO, str("NSAutomaticQuoteSubstitutionEnabled")); + // Setup drag message handler msg(manager, s("addScriptMessageHandler:name:"), app->delegate, str("windowDrag")); // Add mouse event hooks