From e1579c56f3e6a4c5bfc876f455643e9c7cb6f37c Mon Sep 17 00:00:00 2001 From: d_m Date: Sun, 2 Feb 2025 23:57:40 -0500 Subject: [PATCH] fix bug when searching empty input --- femto.tal | 2 ++ 1 file changed, 2 insertions(+) diff --git a/femto.tal b/femto.tal index 44507f4..fb815bd 100644 --- a/femto.tal +++ b/femto.tal @@ -739,6 +739,7 @@ ( execute a search, using the given search string ) @do-search ( -> ) + ;tmp LDA ?{ !return } ( ensure non-empty search string ) .cursor/row LDZ2 .searching/orig-row STZ2 .cursor/col LDZ2 .searching/orig-col STZ2 #0000 .searching/regex STZ2 @@ -759,6 +760,7 @@ ( ) ( TODO: handle invalid regular expressions that fail to compile ) @do-regex-search ( -> ) + ;tmp LDA ?{ !return } ( ensure non-empty search string ) cur-pos DUP2 .searching/start STZ2 .searching/end STZ2 .cursor/row LDZ2 .searching/orig-row STZ2 .cursor/col LDZ2 .searching/orig-col STZ2