From 186c1b2f652a07bd7ecc9809c12643c2e5f2fc4e Mon Sep 17 00:00:00 2001 From: Tom Bogle Date: Thu, 31 May 2018 16:40:30 -0400 Subject: [PATCH] Added explanatory comment --- mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodEventHandler.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodEventHandler.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodEventHandler.m index 7b847a25aa..0795c37743 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodEventHandler.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodEventHandler.m @@ -44,6 +44,10 @@ NSRange _previousSelRange; // This is the public initializer. - (instancetype)initWithClient:(NSString *)clientAppId { + // Note: Pages and Keynote (and possibly lots of other undiscovered apps that are otherwise compliant + // with Apple's IM faramework) need to be treated as "legacy" because if the user selects a different + // font (or other formatting) and then types a sequence that causes characters to be added to the document + // and then subsequently replaced, the replacement causes the formatting decision to be forgotten. BOOL legacy = ([clientAppId isEqual: @"com.apple.iWork.Pages"] || [clientAppId isEqual: @"com.apple.iWork.Keynote"] || [clientAppId isEqual: @"com.github.atom"] ||