making tab and shift tab cycle suggestions

master
tiyn 6 months ago
parent d600a9c974
commit da58be345f

@ -546,7 +546,8 @@ insert:
if (lines > 0)
return;
/* fallthrough */
case XK_Up:
// case XK_Up:
case XK_ISO_Left_Tab:
if (sel && sel->left && (sel = sel->left)->right == curr) {
curr = prev;
calcoffsets();
@ -574,28 +575,29 @@ insert:
if (sel)
sel->out = 1;
break;
case XK_Right:
if (text[cursor] != '\0') {
cursor = nextrune(+1);
break;
}
if (lines > 0)
return;
/* fallthrough */
case XK_Down:
// case XK_Right:
// if (text[cursor] != '\0') {
// cursor = nextrune(+1);
// break;
// }
// if (lines > 0)
// return;
// /* fallthrough */
// case XK_Down:
case XK_Tab:
if (sel && sel->right && (sel = sel->right) == next) {
curr = next;
calcoffsets();
}
break;
case XK_Tab:
if (!sel)
return;
strncpy(text, sel->text, sizeof text - 1);
text[sizeof text - 1] = '\0';
cursor = strlen(text);
match();
break;
// case XK_Tab:
// if (!sel)
// return;
// strncpy(text, sel->text, sizeof text - 1);
// text[sizeof text - 1] = '\0';
// cursor = strlen(text);
// match();
// break;
}
draw:

Loading…
Cancel
Save