FIX: the issue that withExt was still being overridden by parameters when the inplace rename editor was already active

This commit is contained in:
rich2014 2026-05-05 09:40:41 +08:00
commit 218e68fc40

View file

@ -1795,16 +1795,17 @@ procedure TFileViewWithMainCtrl.ShowRenameFileEdit(
var
S: String;
begin
if NOT edtRename.Visible then
FRenFile.WithExt:= withExt;
S:= AFile.Name;
if NOT withExt then
if NOT FRenFile.WithExt then
S:= ExtractOnlyFileName(S);
FRenFile.WithExt:= withExt;
FRenFile.LenFul := UTF8Length(S);
FRenFile.LenExt := UTF8Length(ExtractFileExt(S));
FRenFile.LenNam := FRenFile.LenFul - FRenFile.LenExt;
if edtRename.Visible and (edtRename.Tag < 2) then
begin
if AFile.IsDirectory or AFile.IsLinkToDirectory then Exit;