about summary refs log tree commit diff stats
path: root/apps/factorial3.subx
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-09 22:54:09 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-09 22:57:37 -0800
commit7d400217994c573153fda0e4a28542c75ace3997 (patch)
tree257e9a3603898c4b447dd007c6e06228c192d5f3 /apps/factorial3.subx
parent1969febce5c3043de55b5e28da2f38ca08d17562 (diff)
downloadmu-7d400217994c573153fda0e4a28542c75ace3997.tar.gz
7708 - baremetal/shell: word data structure
Not everything here is tested, but enough that I'm starting to feel confident.

We see our first divergence with apps/tile. In apps/tile we render everything,
then go back and figure out where to position the cursor. This relies on
some low-level smarts and is also quite klunky and complex.

In baremetal/shell I plan to do something simpler: maintain a tree of objects
where each level knows which sub-object under it has the cursor. Now I
can pass in the cursor object to each object, and if it detects that it
has the cursor it can recursively figure out which sub-object has the cursor.
The bottom-most objects (grapheme stacks) draw the cursor as they render
themselves. Single-pass algorithm, draw the cursor as you render, no low-level
smarts needed.

But there's a divergence. What in apps/tile used to look like this, with
a cursor ␣ at the end of the word 'abc':

  abc␣def

..now looks like this:

  abc␣ def

..with an extra space.

This could cause some jarring 'dancing' as you move the cursor through a
list of words.
Diffstat (limited to 'apps/factorial3.subx')
0 files changed, 0 insertions, 0 deletions
>
1295513f ^
94c5d83e ^
e9e4b4ff ^







94c5d83e ^







76f8d548 ^



94c5d83e ^


423ce88a ^

94c5d83e ^








e9e4b4ff ^

50a0cb1c ^
e9e4b4ff ^

90416a69 ^
e9e4b4ff ^
fde932f2 ^
75682d43 ^
e9e4b4ff ^

2c5ea01d ^
e9e4b4ff ^




e9e4b4ff ^

2c5ea01d ^
e9e4b4ff ^
0c2c782d ^

30ae2137 ^
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92