diff options
| author | Masahiro Nakamura | 2019-12-19 00:32:54 +0900 |
|---|---|---|
| committer | Alan Third | 2019-12-22 11:47:29 +0000 |
| commit | ba042176d8931cdf9441b3b4919ec74b75019494 (patch) | |
| tree | 2a4cb526d7b457562dad46cef528a104f8a58324 /src | |
| parent | bfc54230c56dc85cd8a8073962cf6ed00758e1a6 (diff) | |
| download | emacs-ba042176d8931cdf9441b3b4919ec74b75019494.tar.gz emacs-ba042176d8931cdf9441b3b4919ec74b75019494.zip | |
Fix display of working text on NS (Bug#23412, Bug#1453)
* lisp/term/ns-win.el (ns-insert-working-text):
(ns-delete-working-text): Change how working text is deleted to handle
changed order of operations.
* src/nsterm.m ([EmacsView insertText:]): Move deletion of working
text until after insertion of new text.
Copyright-paperwork-exempt: yes
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 6995577920e..9e036aa1608 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -6460,10 +6460,6 @@ not_in_argv (NSString *arg) | |||
| 6460 | if (!emacs_event) | 6460 | if (!emacs_event) |
| 6461 | return; | 6461 | return; |
| 6462 | 6462 | ||
| 6463 | /* First, clear any working text. */ | ||
| 6464 | if (workingText != nil) | ||
| 6465 | [self deleteWorkingText]; | ||
| 6466 | |||
| 6467 | /* It might be preferable to use getCharacters:range: below, | 6463 | /* It might be preferable to use getCharacters:range: below, |
| 6468 | 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. |
| 6469 | 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 |
| @@ -6492,6 +6488,10 @@ not_in_argv (NSString *arg) | |||
| 6492 | emacs_event->code = code; | 6488 | emacs_event->code = code; |
| 6493 | EV_TRAILER ((id)nil); | 6489 | EV_TRAILER ((id)nil); |
| 6494 | } | 6490 | } |
| 6491 | |||
| 6492 | /* Last, clear any working text. */ | ||
| 6493 | if (workingText != nil) | ||
| 6494 | [self deleteWorkingText]; | ||
| 6495 | } | 6495 | } |
| 6496 | 6496 | ||
| 6497 | 6497 | ||