diff --git a/cat_win/src/service/editor.py b/cat_win/src/service/editor.py index e600757..65d7b20 100644 --- a/cat_win/src/service/editor.py +++ b/cat_win/src/service/editor.py @@ -1037,7 +1037,8 @@ def _action_replace(self, replace_next: bool = False) -> bool: if not replace_all: break else: - self.cpos.col -= search.r_len + if search.yielded_result: + self.cpos.col -= search.r_len if self.selecting: self.cpos.set_pos(cpos_tmp) self.spos.set_pos(spos_tmp)