Mercurial Hosting > editor
diff src/luan_editor/find.luan @ 91:ff999e959b74 default tip
find fix
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 04 Jul 2025 15:55:22 -0600 |
parents | 9d32b7115fd1 |
children |
line wrap: on
line diff
--- a/src/luan_editor/find.luan Mon Jun 30 23:43:23 2025 -0600 +++ b/src/luan_editor/find.luan Fri Jul 04 15:55:22 2025 -0600 @@ -20,6 +20,7 @@ local find_text = "" local replace_text = "" +local is_regex = false local function get_matches(text,s) local r = regex(s) @@ -54,7 +55,8 @@ return end find_text = s - if not regex_check_box.is_selected then + is_regex = regex_check_box.is_selected + if not is_regex then s = regex_quote(s) end local matches @@ -109,7 +111,8 @@ local replace = replace_field.text find_text = find replace_text = replace - if not regex_check_box.is_selected then + is_regex = regex_check_box.is_selected + if not is_regex then find = regex_quote(find) replace = regex_quote_replacement(replace) end @@ -222,6 +225,7 @@ find_field.request_focus_in_window() find_field.select_all() replace_field.text = replace_text + regex_check_box.is_selected = is_regex end function window.hide_find_panel() find_panel.is_visible = false