Skip to content

Commit

Permalink
Fix replacing empty strings in Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Nov 4, 2024
1 parent 4d65ed0 commit 840109e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
drkns 2024-11-04 18:56:51+00:00 - build 6389

1. Fix replacing empty strings in Editor.

--------------------------------------------------------------------------------
drkns 2024-10-31 20:22:20+00:00 - build 6388

Expand Down
6 changes: 3 additions & 3 deletions far/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3563,6 +3563,9 @@ void Editor::DoSearchReplace(const SearchReplaceDisposition Disposition)
}
else
{
if (!SearchLength && strReplaceStrCurrent.empty())
ZeroLength = true;

auto MsgCode = message_result::first_button;

if (!IsReplaceAll)
Expand All @@ -3575,9 +3578,6 @@ void Editor::DoSearchReplace(const SearchReplaceDisposition Disposition)
newcol.Priority=EDITOR_COLOR_SELECTION_PRIORITY;
AddColor(CurPtr, newcol);

if (!SearchLength && strReplaceStrCurrent.empty())
ZeroLength = true;

Progress.reset();

MsgCode = Message(0,
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6388
6389

0 comments on commit 840109e

Please sign in to comment.