omadawn / njord

Java iRule Editor
2 stars 1 forks source link

Hitting undo enough times will blank out the iRule contents completely. #33

Closed omadawn closed 12 years ago

omadawn commented 12 years ago

rsyntaxtextarea's built in undo/redo function has an odd quirk. If you hit undo enough times it removes all the code in the screen. I think that might be 'undoing' the part where I stick the code into the text area. Make it not do that.

I might be able to fix this by loading the text then disabling undo and re-enabling undo. Ooh, in order to get undo to work properly I need to create a new ntextarea for each iRule. Hrmmm.... Let's add an nTextarea variable to NjordIruleObject and then when a rule is selected check that, if there's no ntexteditor create one and assign if there is then just load that. Then when you click off a rule you save the ntextarea instead of the text contents.

omadawn commented 12 years ago

This will be solved with issue #10 https://github.com/omadawn/njord/issues/10

omadawn commented 12 years ago

there is a method called discardAllEdits() which makes this the baseline and we can't undo any further.

http://fifesoft.com/forum/viewtopic.php?f=10&t=695

Works now.