about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--browse-slack/environment.mu22
1 files changed, 21 insertions, 1 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu
index d7300146..a802743a 100644
--- a/browse-slack/environment.mu
+++ b/browse-slack/environment.mu
@@ -501,7 +501,7 @@ fn render-slack-message screen: (addr screen), text: (addr array byte), highligh
     compare highlight?, 0/false
     {
       break-if-=
-      x, y <- draw-json-text-wrapping-right-then-down screen, text, x y, 0x70/xmax=post-right-coord ymax, x y, 0/fg 0xf/bg
+      x, y <- draw-json-text-wrapping-right-then-down screen, text, x y, 0x70/xmax=post-right-coord ymax, x y, 0/fg 7/bg
       break $render-slack-message:draw
     }
     x, y <- draw-json-text-wrapping-right-then-down screen, text, x y, 0x70/xmax=post-right-coord ymax, x y, 7/fg 0/bg
@@ -1044,6 +1044,14 @@ fn next-item _env: (addr environment), users: (addr array user), channels: (addr
   var current-tab-index/eax: int <- copy *current-tab-index-a
   var current-tab-offset/eax: (offset tab) <- compute-offset tabs, current-tab-index
   var current-tab/edx: (addr tab) <- index tabs, current-tab-offset
+  var current-tab-intra-item-cursor-position/eax: (addr int) <- get current-tab, intra-item-cursor-position
+  {
+    compare *current-tab-intra-item-cursor-position, 0/user
+    break-if-!=
+    copy-to *current-tab-intra-item-cursor-position, 1/text
+    return
+  }
+  copy-to *current-tab-intra-item-cursor-position, 0/user
   var dest/eax: (addr int) <- get current-tab, item-index
   compare *dest, 0
   break-if-<=
@@ -1059,6 +1067,14 @@ fn previous-item _env: (addr environment), users: (addr array user), _channels:
   var current-tab-index/eax: int <- copy *current-tab-index-a
   var current-tab-offset/eax: (offset tab) <- compute-offset tabs, current-tab-index
   var current-tab/edx: (addr tab) <- index tabs, current-tab-offset
+  var current-tab-intra-item-cursor-position/eax: (addr int) <- get current-tab, intra-item-cursor-position
+  {
+    compare *current-tab-intra-item-cursor-position, 1/text
+    break-if-!=
+    copy-to *current-tab-intra-item-cursor-position, 0/user
+    return
+  }
+  copy-to *current-tab-intra-item-cursor-position, 1/text
   var current-tab-type/eax: (addr int) <- get current-tab, type
   compare *current-tab-type, 0/all-items
   {
@@ -1113,6 +1129,8 @@ fn page-down _env: (addr environment), users: (addr array user), channels: (addr
   var current-tab-index/eax: int <- copy *current-tab-index-a
   var current-tab-offset/eax: (offset tab) <- compute-offset tabs, current-tab-index
   var current-tab/edx: (addr tab) <- index tabs, current-tab-offset
+  var current-tab-intra-item-cursor-position/eax: (addr int) <- get current-tab, intra-item-cursor-position
+  copy-to *current-tab-intra-item-cursor-position, 0/user
   var current-tab-type/eax: (addr int) <- get current-tab, type
   compare *current-tab-type, 0/all-items
   {
@@ -1275,6 +1293,8 @@ fn page-up _env: (addr environment), users: (addr array user), channels: (addr a
   var current-tab-index/eax: int <- copy *current-tab-index-a
   var current-tab-offset/eax: (offset tab) <- compute-offset tabs, current-tab-index
   var current-tab/edx: (addr tab) <- index tabs, current-tab-offset
+  var current-tab-intra-item-cursor-position/eax: (addr int) <- get current-tab, intra-item-cursor-position
+  copy-to *current-tab-intra-item-cursor-position, 0/user
   var current-tab-type/eax: (addr int) <- get current-tab, type
   compare *current-tab-type, 0/all-items
   {
Agaram <vc@akkartik.com> 2016-09-15 01:01:58 -0700 3355' href='/akkartik/mu/commit/html/059to_text.mu.html?h=hlt&id=0ca56ed853c3d9bc8c26d1b014d8b665363fc2d0'>0ca56ed8 ^
e5c11a51 ^






















0ca56ed8 ^


e5c11a51 ^
0ca56ed8 ^
87c5b329 ^
204dae92 ^


87c5b329 ^
204dae92 ^









201458e3 ^
204dae92 ^











201458e3 ^
204dae92 ^















9e751bb8 ^
204dae92 ^

0ca56ed8 ^



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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111