Skip to content

Commit

Permalink
Merge 743d819 into cad4a6e
Browse files Browse the repository at this point in the history
  • Loading branch information
Billy4195 committed May 23, 2017
2 parents cad4a6e + 743d819 commit 972f6b2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/internal/chewingutil.h
Expand Up @@ -37,6 +37,7 @@ int SymbolChoice(ChewingData *pgdata, int sel_i);
int HaninSymbolInput(ChewingData *pgdata);
void WriteChiSymbolToCommitBuf(ChewingData *pgdata, ChewingOutput *pgo, int len);
int ReleaseChiSymbolBuf(ChewingData *pgdata, ChewingOutput *);
void ResetOldChiSymbolCursor(ChewingData *pgdata);
int AddChi(uint16_t phone, uint16_t phoneAlt, ChewingData *pgdata);
int CallPhrasing(ChewingData *pgdata, int all_phrasing);
int MakeOutputWithRtn(ChewingOutput *pgo, ChewingData *pgdata, int keystrokeRtn);
Expand Down
1 change: 1 addition & 0 deletions src/chewingio.c
Expand Up @@ -1625,6 +1625,7 @@ CHEWING_API int chewing_handle_Default(ChewingContext *ctx, int key)
End_KeyDefault:
CallPhrasing(pgdata, 0);
End_Paging:
ResetOldChiSymbolCursor(pgdata);
MakeOutputWithRtn(pgo, pgdata, keystrokeRtn);
return 0;
}
Expand Down
6 changes: 6 additions & 0 deletions src/chewingutil.c
Expand Up @@ -529,6 +529,12 @@ int ReleaseChiSymbolBuf(ChewingData *pgdata, ChewingOutput *pgo)
return throwEnd;
}

/* Sync the oldChiSymbolCursor after choice */
void ResetOldChiSymbolCursor(ChewingData *pgdata)
{
pgdata->choiceInfo.oldChiSymbolCursor = pgdata->chiSymbolCursor;
}

static int ChewingIsBreakPoint(int cursor, ChewingData *pgdata)
{
static const char *const BREAK_WORD[] = {
Expand Down
4 changes: 4 additions & 0 deletions src/choice.c
Expand Up @@ -517,6 +517,10 @@ int ChoiceNextAvail(ChewingData *pgdata)
return 0;
}

/* TODO:
** Distinguish in what situation the chiSymbolCursor should be
** reset to the oldChiSymbolCursor
*/
int ChoiceEndChoice(ChewingData *pgdata)
{
pgdata->bSelect = 0;
Expand Down

0 comments on commit 972f6b2

Please sign in to comment.