diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index c1d1d411176..ed2d82ceaef 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -6456,6 +6456,10 @@ not_in_argv (NSString *arg) | |||
| 6456 | if (!emacs_event) | 6456 | if (!emacs_event) |
| 6457 | return; | 6457 | return; |
| 6458 | 6458 | ||
| 6459 | /* First, clear any working text. */ | ||
| 6460 | if (workingText != nil) | ||
| 6461 | [self deleteWorkingText]; | ||
| 6462 | |||
| 6459 | /* It might be preferable to use getCharacters:range: below, | 6463 | /* It might be preferable to use getCharacters:range: below, |
| 6460 | cf. https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/StringDrawing.html#//apple_ref/doc/uid/TP40001445-112378. | 6464 | cf. https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/StringDrawing.html#//apple_ref/doc/uid/TP40001445-112378. |
| 6461 | However, we probably can't use SAFE_NALLOCA here because it might | 6465 | However, we probably can't use SAFE_NALLOCA here because it might |
| @@ -6484,10 +6488,6 @@ not_in_argv (NSString *arg) | |||
| 6484 | emacs_event->code = code; | 6488 | emacs_event->code = code; |
| 6485 | EV_TRAILER ((id)nil); | 6489 | EV_TRAILER ((id)nil); |
| 6486 | } | 6490 | } |
| 6487 | |||
| 6488 | /* Last, clear any working text. */ | ||
| 6489 | if (workingText != nil) | ||
| 6490 | [self deleteWorkingText]; | ||
| 6491 | } | 6491 | } |
| 6492 | 6492 | ||
| 6493 | 6493 | ||