Skip to content

Commit 2591b2a

Browse files
committed
fix SLiMguiLegacy bug with non-breaking spaces
1 parent 7e2c5a8 commit 2591b2a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

EidosScribe/EidosTextView.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ - (IBAction)paste:(id)sender
377377
pbString = [pbString stringByReplacingOccurrencesOfString:@"\r" withString:@"\n"];
378378
pbString = [pbString stringByReplacingOccurrencesOfString:@"\U00002028" withString:@"\n"]; // NSLineSeparatorCharacter
379379
pbString = [pbString stringByReplacingOccurrencesOfString:@"\U00002029" withString:@"\n"]; // NSParagraphSeparatorCharacter
380+
pbString = [pbString stringByReplacingOccurrencesOfString:@"\U000000A0" withString:@" "]; // Unicode "no-break space"
381+
pbString = [pbString stringByReplacingOccurrencesOfString:@"\U0000202F" withString:@" "]; // Unicode "narrow no-break space"
382+
pbString = [pbString stringByReplacingOccurrencesOfString:@"\U00002009" withString:@" "]; // Unicode "thin space"
383+
pbString = [pbString stringByReplacingOccurrencesOfString:@"\U00002007" withString:@" "]; // Unicode "figure space"
380384

381385
[self insertText:pbString replacementRange:[self selectedRange]];
382386
}

0 commit comments

Comments
 (0)