From 4861c39474965eeb69b34b63a99e09c812c5fefc Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 5 Apr 2021 22:39:37 -0700 Subject: shell: ctrl-a/e --- shell/gap-buffer.mu | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'shell') 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 } -- cgit 1.4.1-2-gfad0 1118103e'>this commit Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log tree commit diff stats
path: root/generic.mu
blob: 1c4b9bb05d3591225b36726b5ba1c0a3d56f14f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30