mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix unwanted completion list (fix #468)
This commit is contained in:
parent
aef17c3146
commit
254c571236
@ -18,6 +18,7 @@ Change Log
|
||||
### Fixes
|
||||
|
||||
- Fix an issue where some type of script file cannot be opened because of “unidentified developer” alert even it was made on CotEditor.
|
||||
- Fix an issue where unwanted completion list was displayed by auto-completion when after typing a symbol character.
|
||||
|
||||
|
||||
|
||||
|
@ -349,6 +349,9 @@
|
||||
- (nonnull NSArray<NSString *> *)textView:(nonnull NSTextView *)textView completions:(nonnull NSArray<NSString *> *)words forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(nullable NSInteger *)index
|
||||
// ------------------------------------------------------
|
||||
{
|
||||
// do nothing if completion is not suggested from the typed characters
|
||||
if (charRange.length == 0) { return @[]; }
|
||||
|
||||
NSMutableOrderedSet<NSString *> *candidateWords = [NSMutableOrderedSet orderedSet];
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *partialWord = [[textView string] substringWithRange:charRange];
|
||||
|
Loading…
Reference in New Issue
Block a user