mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 13:09:22 +02:00
Opening same file in a second window don't destroy any changes
This commit is contained in:
parent
31bc7c4054
commit
528ff51a8f
@ -2217,7 +2217,9 @@ begin
|
|||||||
AFileName:='';
|
AFileName:='';
|
||||||
New(Editor, Init(R, HSB, VSB, Indicator,AFileName));
|
New(Editor, Init(R, HSB, VSB, Indicator,AFileName));
|
||||||
Editor^.GrowMode:=gfGrowHiX+gfGrowHiY;
|
Editor^.GrowMode:=gfGrowHiX+gfGrowHiY;
|
||||||
if LoadFile then
|
{load from file if there is no other window with the same file }
|
||||||
|
if Editor^.Core^.GetBindingCount = 1 then
|
||||||
|
if LoadFile then
|
||||||
begin
|
begin
|
||||||
if Editor^.LoadFile=false then
|
if Editor^.LoadFile=false then
|
||||||
ErrorBox(FormatStrStr(msg_errorreadingfile,AFileName),nil)
|
ErrorBox(FormatStrStr(msg_errorreadingfile,AFileName),nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user