556 |
|
|
557 |
cl_insert (cmdline); |
cl_insert (cmdline); |
558 |
|
|
559 |
grub_history_add (buf); |
if (hist_used == 0) |
560 |
|
grub_history_add (buf); |
561 |
|
|
562 |
while ((key = GRUB_TERM_ASCII_CHAR (grub_getkey ())) != '\n' && key != '\r') |
while ((key = GRUB_TERM_ASCII_CHAR (grub_getkey ())) != '\n' && key != '\r') |
563 |
{ |
{ |
642 |
lpos = 0; |
lpos = 0; |
643 |
|
|
644 |
if (histpos > 0) |
if (histpos > 0) |
645 |
histpos--; |
{ |
646 |
|
grub_history_replace (histpos, buf); |
647 |
|
histpos--; |
648 |
|
} |
649 |
|
|
650 |
cl_delete (llen); |
cl_delete (llen); |
651 |
hist = grub_history_get (histpos); |
hist = grub_history_get (histpos); |
660 |
lpos = 0; |
lpos = 0; |
661 |
|
|
662 |
if (histpos < hist_used - 1) |
if (histpos < hist_used - 1) |
663 |
histpos++; |
{ |
664 |
|
grub_history_replace (histpos, buf); |
665 |
|
histpos++; |
666 |
|
} |
667 |
|
|
668 |
cl_delete (llen); |
cl_delete (llen); |
669 |
hist = grub_history_get (histpos); |
hist = grub_history_get (histpos); |
730 |
} |
} |
731 |
break; |
break; |
732 |
} |
} |
|
|
|
|
grub_history_replace (histpos, buf); |
|
733 |
} |
} |
734 |
|
|
735 |
grub_putchar ('\n'); |
grub_putchar ('\n'); |
741 |
while (buf[lpos] == ' ') |
while (buf[lpos] == ' ') |
742 |
lpos++; |
lpos++; |
743 |
|
|
744 |
|
histpos = 0; |
745 |
|
if (grub_strlen (buf) > 0) |
746 |
|
{ |
747 |
|
grub_history_replace (histpos, buf); |
748 |
|
grub_history_add (""); |
749 |
|
} |
750 |
|
|
751 |
grub_memcpy (cmdline, buf + lpos, llen - lpos + 1); |
grub_memcpy (cmdline, buf + lpos, llen - lpos + 1); |
752 |
|
|
753 |
return 1; |
return 1; |