mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 05:07:54 -05:00
When clearing marked range, ensure pending range is also cleared
This fixes an issue with complex input managers. Using Chinese pinyin input and entering ‘ci’ followed by ‘1’ to insert first glyph would insert the glyph (‘刺’) and then set the pending marked range (0-2), which would have caret end up in the middle of a multi-byte sequence.
This commit is contained in:
@@ -1082,7 +1082,7 @@ doScroll:
|
||||
{
|
||||
D(DBF_OakTextView_TextInput, bug("\n"););
|
||||
AUTO_REFRESH;
|
||||
markedRanges = ng::ranges_t();
|
||||
markedRanges = pendingMarkedRanges = ng::ranges_t();
|
||||
}
|
||||
|
||||
- (BOOL)hasMarkedText
|
||||
@@ -2045,6 +2045,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
[self delete:nil];
|
||||
markedRanges = ng::ranges_t();
|
||||
}
|
||||
pendingMarkedRanges = ng::ranges_t();
|
||||
|
||||
if(![aString isKindOfClass:[NSString class]])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user