From 8af07c0abd9418cbada2c16caec1a2f19759729f Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 27 Dec 2014 17:14:55 -0500 Subject: [PATCH] Fix bug in clear-mark. --- rmacs/rope.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmacs/rope.rkt b/rmacs/rope.rkt index 5163b6c..ba14464 100644 --- a/rmacs/rope.rkt +++ b/rmacs/rope.rkt @@ -307,7 +307,7 @@ [mark-index (let* ((old-marks (rope-mark-index r)) (old-mark (hash-ref old-marks mtype (lambda () (hash))))) - (define new-mark (hash-remove old-mark position)) + (define new-mark (hash-remove old-mark (- position (rope-lo r)))) (if (hash-empty? new-mark) (hash-remove old-marks mtype) (hash-set old-marks mtype new-mark)))]))))