From c1885c8038c530538b6b34bf7e166df0e09180c6 Mon Sep 17 00:00:00 2001 From: d6 Date: Sun, 10 Apr 2022 13:55:40 -0400 Subject: [PATCH] clean up femto --- femto.tal | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/femto.tal b/femto.tal index 57c7c3e..b6a3047 100644 --- a/femto.tal +++ b/femto.tal @@ -880,10 +880,9 @@ ( this method unsets searching/active and also restores ) ( the original cursor position. ) @cancel-search - #00 .searching/active STZ .searching/orig-row LDZ2 ;jump-to-line JSR2 .searching/orig-col LDZ2 .cursor/col STZ2 - ;redraw-all JSR2 ;return JMP2 + ,finish-search JMP ( cancel the active search ) ( ) @@ -891,7 +890,7 @@ ( this leaves the cursor where it is. ) @finish-search #00 .searching/active STZ - ;redraw-all JSR2 ;return JMP2 + ;reset-arena JSR2 ;redraw-all JSR2 ;return JMP2 ( TODO: i haven't decided how to solve the problem of ) ( overlapping matches yet. i don't really want to maintain ) @@ -1104,7 +1103,6 @@ ( these don't perform a redraw right away, but instead ) ( signal that the next drawing should include that part. ) @redraw-cursor ( -> ) #01 ,redraw-add JMP -@redraw-statusbar ( -> ) #02 ,redraw-add JMP @redraw-statusbar-and-cursor ( -> ) #03 ,redraw-add JMP @redraw-prompt-and-cursor ( -> ) #05 ,redraw-add JMP @redraw-matches ( -> ) #08 ,redraw-add JMP @@ -1629,8 +1627,8 @@ &loop LDAk STH2kr STA INC2 INC2r DUP2 ;undo-stack/pos LDA2 LTH2 ,&loop JCN - &done ;undo-stack/pos LDA2k #0003 SUB2 SWP2 STA2 - POP2 POP2r JMP2r + ;undo-stack/pos LDA2k #0003 SUB2 SWP2 STA2 + POP2 POP2r JMP2r ( push a new item on the undo stack ) @u-push ( c^ addr* -> )