fix bug when searching empty input

This commit is contained in:
~d6 2025-02-02 23:57:40 -05:00
parent 8832be799d
commit e1579c56f3
1 changed files with 2 additions and 0 deletions

View File

@ -739,6 +739,7 @@
( execute a search, using the given search string ) ( execute a search, using the given search string )
@do-search ( -> ) @do-search ( -> )
;tmp LDA ?{ !return } ( ensure non-empty search string )
.cursor/row LDZ2 .searching/orig-row STZ2 .cursor/row LDZ2 .searching/orig-row STZ2
.cursor/col LDZ2 .searching/orig-col STZ2 .cursor/col LDZ2 .searching/orig-col STZ2
#0000 .searching/regex STZ2 #0000 .searching/regex STZ2
@ -759,6 +760,7 @@
( ) ( )
( TODO: handle invalid regular expressions that fail to compile ) ( TODO: handle invalid regular expressions that fail to compile )
@do-regex-search ( -> ) @do-regex-search ( -> )
;tmp LDA ?{ !return } ( ensure non-empty search string )
cur-pos DUP2 .searching/start STZ2 .searching/end STZ2 cur-pos DUP2 .searching/start STZ2 .searching/end STZ2
.cursor/row LDZ2 .searching/orig-row STZ2 .cursor/row LDZ2 .searching/orig-row STZ2
.cursor/col LDZ2 .searching/orig-col STZ2 .cursor/col LDZ2 .searching/orig-col STZ2