KeyHandler // Simplify: _actualCandidateCursorIndex.
This commit is contained in:
parent
81388216cd
commit
be904c2393
|
@ -1429,16 +1429,11 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
|
||||||
- (size_t)_actualCandidateCursorIndex
|
- (size_t)_actualCandidateCursorIndex
|
||||||
{
|
{
|
||||||
size_t cursorIndex = _builder->cursorIndex();
|
size_t cursorIndex = _builder->cursorIndex();
|
||||||
if (Preferences.selectPhraseAfterCursorAsCandidate) {
|
|
||||||
// MS Phonetics IME style, phrase is *after* the cursor, i.e. cursor is always *before* the phrase
|
// MS Phonetics IME style, phrase is *after* the cursor, i.e. cursor is always *before* the phrase
|
||||||
if (cursorIndex < _builder->length()) {
|
if ((Preferences.selectPhraseAfterCursorAsCandidate && (cursorIndex < _builder->length()))
|
||||||
|
|| !cursorIndex) {
|
||||||
++cursorIndex;
|
++cursorIndex;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (!cursorIndex) {
|
|
||||||
++cursorIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return cursorIndex;
|
return cursorIndex;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue