Thread: PATCH: Clear undo/redo history when a file is opened in Query editor

PATCH: Clear undo/redo history when a file is opened in Query editor

From
"J.F. Oster"
Date:
Hello!

A user may occasionaly assign content of a previously edited file into
a next file opened in the same Query window, by calling Undo and Save.

Simple non-MDI text editors (for example, notepad.exe) prevent an
issue by clearing undo/redo history, so should we do.
Please see the attached patch.

--
Best regards,
 J.F.

Attachment

Re: PATCH: Clear undo/redo history when a file is opened in Query editor

From
Dave Page
Date:
Ashesh, can you review/commit this please?

On Fri, Oct 24, 2014 at 8:35 PM, J.F. Oster <jinfroster@mail.ru> wrote:
> Hello!
>
> A user may occasionaly assign content of a previously edited file into
> a next file opened in the same Query window, by calling Undo and Save.
>
> Simple non-MDI text editors (for example, notepad.exe) prevent an
> issue by clearing undo/redo history, so should we do.
> Please see the attached patch.
>
> --
> Best regards,
>  J.F.
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: PATCH: Clear undo/redo history when a file is opened in Query editor

From
Sanket Mehta
Date:
Hi,

As per my understanding below is the bug scenario.

- open any file in sql editor..
- now open a second file in same editor and try undo.
- it will show you previous file content again. 

Let me know if my understanding is correct so that i can go ahead and review the patch.



Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb

On Mon, Oct 27, 2014 at 4:14 PM, Dave Page <dpage@pgadmin.org> wrote:
Ashesh, can you review/commit this please?

On Fri, Oct 24, 2014 at 8:35 PM, J.F. Oster <jinfroster@mail.ru> wrote:
> Hello!
>
> A user may occasionaly assign content of a previously edited file into
> a next file opened in the same Query window, by calling Undo and Save.
>
> Simple non-MDI text editors (for example, notepad.exe) prevent an
> issue by clearing undo/redo history, so should we do.
> Please see the attached patch.
>
> --
> Best regards,
>  J.F.
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Re: PATCH: Clear undo/redo history when a file is opened in Query editor

From
"J.F. Oster"
Date:
Hello Sanket,


SM> As per my understanding below is the bug scenario.
Yes,

 - open any file in sql editor..
 - perform some modifications to file so that Undo is possible.
 - now open a second file in same editor and try Undo. It will show
   you previous file content again.═
 - do Save.

Now contents of the second file is replaced on disk with contents of
the previous file.


SM> On Mon, Oct 27, 2014 at 4:14 PM, Dave Page <dpage@pgadmin.org> wrote:
SM> Ashesh, can you review/commit this please?

SM> On Fri, Oct 24, 2014 at 8:35 PM, J.F. Oster <jinfroster@mail.ru> wrote:
>> Hello!
>>
>> A user may occasionaly assign content of a previously edited file into
>> a next file opened in the same Query window, by calling Undo and Save.
>>
>> Simple non-MDI text editors (for example, notepad.exe) prevent an
>> issue by clearing undo/redo history, so should we do.
>> Please see the attached patch.
>>


--
Best regards,
 J.F.



Re: PATCH: Clear undo/redo history when a file is opened in Query editor

From
Sanket Mehta
Date:
Hi J.F.

Thank you for the clarification.
I have reviewed the patch.
It seems working fine.



Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb

On Tue, Oct 28, 2014 at 9:38 PM, J.F. Oster <jinfroster@mail.ru> wrote:
Hello Sanket,


SM> As per my understanding below is the bug scenario.
Yes,

 - open any file in sql editor..
 - perform some modifications to file so that Undo is possible.
 - now open a second file in same editor and try Undo. It will show
   you previous file content again.═
 - do Save.

Now contents of the second file is replaced on disk with contents of
the previous file.


SM> On Mon, Oct 27, 2014 at 4:14 PM, Dave Page <dpage@pgadmin.org> wrote:
SM> Ashesh, can you review/commit this please?

SM> On Fri, Oct 24, 2014 at 8:35 PM, J.F. Oster <jinfroster@mail.ru> wrote:
>> Hello!
>>
>> A user may occasionaly assign content of a previously edited file into
>> a next file opened in the same Query window, by calling Undo and Save.
>>
>> Simple non-MDI text editors (for example, notepad.exe) prevent an
>> issue by clearing undo/redo history, so should we do.
>> Please see the attached patch.
>>


--
Best regards,
 J.F.


Re: PATCH: Clear undo/redo history when a file is opened in Query editor

From
Ashesh Vashi
Date:
Thanks for the patch.
Committed to the master branch.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi


On Tue, Oct 28, 2014 at 9:59 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi J.F.

Thank you for the clarification.
I have reviewed the patch.
It seems working fine.



Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb

On Tue, Oct 28, 2014 at 9:38 PM, J.F. Oster <jinfroster@mail.ru> wrote:
Hello Sanket,


SM> As per my understanding below is the bug scenario.
Yes,

 - open any file in sql editor..
 - perform some modifications to file so that Undo is possible.
 - now open a second file in same editor and try Undo. It will show
   you previous file content again.═
 - do Save.

Now contents of the second file is replaced on disk with contents of
the previous file.


SM> On Mon, Oct 27, 2014 at 4:14 PM, Dave Page <dpage@pgadmin.org> wrote:
SM> Ashesh, can you review/commit this please?

SM> On Fri, Oct 24, 2014 at 8:35 PM, J.F. Oster <jinfroster@mail.ru> wrote:
>> Hello!
>>
>> A user may occasionaly assign content of a previously edited file into
>> a next file opened in the same Query window, by calling Undo and Save.
>>
>> Simple non-MDI text editors (for example, notepad.exe) prevent an
>> issue by clearing undo/redo history, so should we do.
>> Please see the attached patch.
>>


--
Best regards,
 J.F.