shell: ctrl-a/e

This commit is contained in:
Kartik K. Agaram 2021-04-05 22:39:37 -07:00
parent 143cce94ee
commit 4861c39474
1 changed files with 12 additions and 0 deletions

View File

@ -771,6 +771,18 @@ fn edit-gap-buffer self: (addr gap-buffer), key: grapheme {
var dummy/eax: grapheme <- gap-right self
return
}
{
compare g, 1/ctrl-a
break-if-!=
gap-to-start self
return
}
{
compare g, 5/ctrl-e
break-if-!=
gap-to-end self
return
}
# default: insert character
add-grapheme-at-gap self, g
}