From 84d2febc777bc8e57d29c03427b79f1aa09eaa4b Mon Sep 17 00:00:00 2001 From: Silas Kraume Date: Wed, 11 Dec 2024 20:42:03 +0100 Subject: [PATCH] editor - do not replace empty with empty --- cat_win/src/service/editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cat_win/src/service/editor.py b/cat_win/src/service/editor.py index 2fcda65..3a0a411 100644 --- a/cat_win/src/service/editor.py +++ b/cat_win/src/service/editor.py @@ -503,6 +503,8 @@ def _replace_search(self, r_this, r_with: str, search_: _SearchIterBase) -> None if not isinstance(r_this, str): r_this = self.window_content[self.cpos.row][self.cpos.col:self.cpos.col+search_.s_len] r_with = search_.replace + if not r_this and not r_with: + return self._key_replace_search(r_this, r_with) self.history.add(b'_key_replace_search', False, pre_cpos, self.cpos.get_pos(),