Fri Nov 12 15:57:40 PST 1999

(KainX)

Wrap-around history.


SVN revision: 1285
This commit is contained in:
Michael Jennings 1999-11-12 23:32:49 +00:00
parent 8a5b31f7f5
commit ce2f577578
3 changed files with 32 additions and 9 deletions

View File

@ -521,3 +521,10 @@ Fri Nov 12 15:37:46 PST 1999
(KainX)
Some UI changes to make E-Exec a little more friendly. :-)
-------------------------------------------------------------------------------
Fri Nov 12 15:57:40 PST 1999
(KainX)
Wrap-around history.

View File

@ -1470,6 +1470,7 @@ Epplet_reset_textbox(Epplet_gadget eg)
g->contents = NULL;
}
g->cursor_pos = g->text_offset = 0;
Epplet_draw_textbox(eg);
}
void

View File

@ -55,8 +55,15 @@ run_contents(void *data)
static void
hist_last(void *data)
{
if (current_command > 0)
Epplet_change_textbox(textbox, command_history[--current_command]);
if (current_command == 0)
{
current_command = num_commands;
Epplet_reset_textbox(textbox);
}
else
{
Epplet_change_textbox(textbox, command_history[--current_command]);
}
return;
data = NULL;
@ -65,13 +72,21 @@ hist_last(void *data)
static void
hist_next(void *data)
{
if (current_command < num_commands-1)
Epplet_change_textbox(textbox, command_history[++current_command]);
else if(current_command == num_commands-1)
{
current_command++;
Epplet_change_textbox(textbox, "");
}
if (current_command == num_commands - 1)
{
current_command++;
Epplet_reset_textbox(textbox);
return;
}
else if (current_command >= num_commands)
{
current_command = 0;
}
else
{
current_command++;
}
Epplet_change_textbox(textbox, command_history[current_command]);
return;
data = NULL;