diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-04-05 22:39:37 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-04-05 22:39:37 -0700 |
commit | 4861c39474965eeb69b34b63a99e09c812c5fefc (patch) | |
tree | 21a12eee27235230aa5aff839145ab82ab107c1d /shell | |
parent | 143cce94eea904ef025c94238fe3541b87ad694e (diff) | |
download | mu-4861c39474965eeb69b34b63a99e09c812c5fefc.tar.gz |
shell: ctrl-a/e
Diffstat (limited to 'shell')
-rw-r--r-- | shell/gap-buffer.mu | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/gap-buffer.mu b/shell/gap-buffer.mu index 616500b0..394ec358 100644 --- a/shell/gap-buffer.mu +++ b/shell/gap-buffer.mu @@ -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 } |