[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-users
Subject:    Re: [ jEdit-users ] modified buffer dot
From:       Slava Pestov <sp () gjt ! org>
Date:       2000-08-30 19:58:01
[Download RAW message or body]

Hi,

Thanks for the suggestion! I implemented it and it worked. Great.

Slava

Erik Mattsson wrote:
> Hi Slava
> 
> I have an idea that might help you with this, if you want to implement the
> mentioned feature (i sure could use it too).
> 
> Anyhow when saving a buffer, the Buffer class can store which undo action
> is next in the UndoManager (through editToBeUndone) in a pointer ( in the buffer class).
> Then when the user edits the text (by inserting new undo actions) and starts
> calling the undo method, the program (Buffer class) checks if the next Undo action is the
> one stored when saving the file. And if it is, then the buffer hasnt been
> changed since the last save, and then the file dot can be changed. But then
> when the users writes some more by inserting more undo:able actions it (buffer class again)
> can check if the file dot should change or not.
> 
> Im not sure if this way works, but it is a possibility, it all comes down
> to how the UndoManager stores its Undo/Redo actions.
> 
> Comments ?
> 
> //Erik

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic