Fixed a little bug that stopped you from removing item 1
parent
c1da55989b
commit
4c491e41c8
|
@ -159,7 +159,11 @@
|
||||||
[list-length (length listof-nicethings)])
|
[list-length (length listof-nicethings)])
|
||||||
(if (and (not (null? listof-nicethings))
|
(if (and (not (null? listof-nicethings))
|
||||||
(number? item-number)
|
(number? item-number)
|
||||||
(positive? item-number)
|
;; zero is okay in an index, but the user is never
|
||||||
|
;; presented with a 0 option, so, if the user types
|
||||||
|
;; `nicethings rm 1` add back the 1 that was
|
||||||
|
;; subtracted above
|
||||||
|
(positive? (add1 item-number))
|
||||||
;; less than length, because the index
|
;; less than length, because the index
|
||||||
;; starts at 0 under the hood
|
;; starts at 0 under the hood
|
||||||
(< item-number list-length))
|
(< item-number list-length))
|
||||||
|
|
Loading…
Reference in New Issue