mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix text completion
This commit is contained in:
parent
e84b4f2ced
commit
8632cd1394
11
CHANGELOG.md
11
CHANGELOG.md
@ -2,7 +2,16 @@
|
||||
Change Log
|
||||
==========================
|
||||
|
||||
3.0.1 (159)
|
||||
develop
|
||||
--------------------------
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue where text completion list did occasionally not displayed.
|
||||
|
||||
|
||||
|
||||
3.0.1 (160)
|
||||
--------------------------
|
||||
|
||||
### Fixes
|
||||
|
@ -1311,10 +1311,11 @@ extension EditorTextView {
|
||||
// abord if:
|
||||
guard !self.hasMarkedText(), // input is not specified (for Japanese input)
|
||||
self.selectedRange.length == 0, // selected
|
||||
let nextCharacter = self.characterAfterInsertion, !CharacterSet.alphanumerics.contains(nextCharacter), // caret is (probably) at the middle of a word
|
||||
let lastCharacter = self.characterBeforeInsertion, !CharacterSet.whitespacesAndNewlines.contains(lastCharacter) // previous character is blank
|
||||
else { return }
|
||||
|
||||
if let nextCharacter = self.characterAfterInsertion, CharacterSet.alphanumerics.contains(nextCharacter) { return } // caret is (probably) at the middle of a word
|
||||
|
||||
self.complete(self)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user