Skip to content

Commit

Permalink
tytsim:Allow up/down key changes the page of tsin candidates, hime-im…
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb- committed Mar 13, 2012
1 parent ca82d4b commit 06fd833
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/tsin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,10 +1710,14 @@ int feedkey_pp(KeySym xkey, int kbstate)
N = phrase_count + pho_count - tss.current_page;
if (N > phkbm.selkeyN)
N = phkbm.selkeyN;
tss.pho_menu_idx--;
if (tss.pho_menu_idx < 0)
tss.pho_menu_idx = N-1;
disp_current_sel_page();
if (tss.pho_menu_idx == 0)
tsin_page_up();
else {
tss.pho_menu_idx--;
if (tss.pho_menu_idx < 0)
tss.pho_menu_idx = N-1;
disp_current_sel_page();
}
return 1;
case XK_Prior:
case XK_KP_Prior:
Expand Down Expand Up @@ -1767,12 +1771,12 @@ int feedkey_pp(KeySym xkey, int kbstate)
if (!tss.sel_pho) {
open_select_pho();
} else {
if (xkey == XK_space)
int N = phrase_count + pho_count - tss.current_page;
if (N > phkbm.selkeyN)
N = phkbm.selkeyN;
if (tss.pho_menu_idx == N-1 || xkey == XK_space)
tsin_page_down();
else {
int N = phrase_count + pho_count - tss.current_page;
if (N > phkbm.selkeyN)
N = phkbm.selkeyN;
tss.pho_menu_idx = (tss.pho_menu_idx+1) % N;
disp_current_sel_page();
}
Expand Down

0 comments on commit 06fd833

Please sign in to comment.