mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [2801892] Странное поведение командной строки и Ctrl+Enter.
This commit is contained in:
parent
80b1cb3b2e
commit
6bc6462f54
1 changed files with 22 additions and 4 deletions
|
|
@ -528,23 +528,38 @@ end;
|
|||
//------------------------------------------------------
|
||||
|
||||
procedure TActs.cm_AddPathToCmdLine(param:string);
|
||||
var
|
||||
OldPosition: Integer;
|
||||
begin
|
||||
with frmMain.ActiveFrame do
|
||||
begin
|
||||
OldPosition := edtCmdLine.SelStart;
|
||||
edtCmdLine.Text := edtCmdLine.Text + (pnlFile.ActiveDir);
|
||||
edtCmdLine.SelStart := OldPosition + Length(pnlFile.ActiveDir);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TActs.cm_AddFilenameToCmdLine(param: string='');
|
||||
var
|
||||
AddedString: String;
|
||||
OldPosition: Integer;
|
||||
begin
|
||||
with frmMain.ActiveFrame do
|
||||
begin
|
||||
if IsActiveItemValid then
|
||||
edtCmdLine.Text := edtCmdLine.Text + pnlFile.GetActiveItem^.sName + ' ';
|
||||
begin
|
||||
OldPosition := edtCmdLine.SelStart;
|
||||
AddedString := pnlFile.GetActiveItem^.sName + ' ';
|
||||
edtCmdLine.Text := edtCmdLine.Text + AddedString;
|
||||
edtCmdLine.SelStart := OldPosition + Length(AddedString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TActs.cm_AddPathAndFilenameToCmdLine(param: string='');
|
||||
var
|
||||
AddedString: String;
|
||||
OldPosition: Integer;
|
||||
begin
|
||||
with frmMain.ActiveFrame do
|
||||
begin
|
||||
|
|
@ -552,13 +567,16 @@ begin
|
|||
begin
|
||||
if (pnlFile.GetActiveItem^.sName = '..') then
|
||||
begin
|
||||
edtCmdLine.Text := edtCmdLine.Text + pnlFile.ActiveDir + ' ';
|
||||
AddedString := pnlFile.ActiveDir + ' ';
|
||||
end
|
||||
else
|
||||
begin
|
||||
edtCmdLine.Text := edtCmdLine.Text + pnlFile.ActiveDir +
|
||||
pnlFile.GetActiveItem^.sName + ' ';
|
||||
AddedString := pnlFile.ActiveDir + pnlFile.GetActiveItem^.sName + ' ';
|
||||
end;
|
||||
|
||||
OldPosition := edtCmdLine.SelStart;
|
||||
edtCmdLine.Text := edtCmdLine.Text + AddedString;
|
||||
edtCmdLine.SelStart := OldPosition + Length(AddedString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue