Skip to content

Commit

Permalink
Correcting incorrect object init
Browse files Browse the repository at this point in the history
  • Loading branch information
beldenfox committed Jan 6, 2024
1 parent de8bc9b commit 2599464
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -720,12 +720,14 @@ - (void)setInputMethodEnabled:(BOOL)enabled
- (void)finishInputMethodComposition
{
IMLOG("finishInputMethodComposition called");
// Commit text that was in progress
if (nsAttrBuffer != nil && nsAttrBuffer.length != 0) {
NSString* string = nsAttrBuffer.string;
[_delegate notifyInputMethod:string attr:4 length:string.length cursor:string.length selectedRange: NSMakeRange(NSNotFound, 0)];
}
[nsAttrBuffer initWithString:@""];
// End composition phase
[self.inputContext discardMarkedText];
nsAttrBuffer = [nsAttrBuffer initWithString:@""];
self->shouldProcessKeyEvent = YES;
}

Expand Down

0 comments on commit 2599464

Please sign in to comment.