core: use GRUB_TERM_ definitions when handling term characters
* Also use hex value for GRUB_TERM_ESC as '\e' is not in the C standard and is not understood by some compilers
This commit is contained in:
parent
f826330683
commit
bdd89d239c
13 changed files with 25 additions and 24 deletions
|
@ -626,12 +626,12 @@ grub_cmdline_get (const char *prompt_translated)
|
|||
cl_insert (cl_terms, nterms, &lpos, &llen, &max_len, &buf, kill_buf);
|
||||
break;
|
||||
|
||||
case '\e':
|
||||
case GRUB_TERM_ESC:
|
||||
grub_free (cl_terms);
|
||||
grub_free (buf);
|
||||
return 0;
|
||||
|
||||
case '\b':
|
||||
case GRUB_TERM_BACKSPACE:
|
||||
if (lpos > 0)
|
||||
{
|
||||
lpos--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue