File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 144
144
(->> s
145
145
reverse
146
146
(take-while (complement (partial = \newline)))
147
- count))]
147
+ count
148
+ inc))]
148
149
[rows cols]))))
149
150
150
151
(defn ^:no-doc +extent
151
152
[[row col] [row-extent col-extent]]
152
153
[(+ row row-extent)
153
154
(cond-> col-extent (zero? row-extent) (+ col))])
155
+
Original file line number Diff line number Diff line change 21
21
22
22
(tabular
23
23
(fact " z/right tracks position correctly"
24
- (let [root (base/of-string " [hello world ]" )
25
- zloc (nth (iterate z/right ( z/down root) ) ?n)]
24
+ (let [root (base/of-string " [hello \n world ]" )
25
+ zloc (nth (iterate z/next root) ?n)]
26
26
(z/position zloc) => ?pos))
27
27
?n ?pos
28
- 0 [1 2 ]
29
- 1 [1 7 ]
30
- 2 [1 8 ])
28
+ 1 [1 2 ]
29
+ 2 [1 7 ]
30
+ 3 [1 8 ]
31
+ 4 [2 1 ])
31
32
32
33
(fact " z/rightmost tracks position correctly"
33
34
(let [root (base/of-string " [hello world]" )]
You can’t perform that action at this time.
0 commit comments