Skip to content

Commit

Permalink
fix invalid cursor position after editor replace next
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Dec 5, 2024
1 parent 385e297 commit c3ce4a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cat_win/src/service/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c3ce4a1

Please sign in to comment.