Save All has recently started failing. Rather than saving all the dirty buffers,
some buffers are saved correctly while others seem to have been reverted, saved part
way through the revert, and are still marked dirty. The file on drive may have, for
example, one of three edits done and the other two not done, while the open buffer
shows none of the edits done, but all of the edit lines marked dirty using the DirtyGutter
plugin. If I use the Redo function, the edits all reappear, one by one. There seems
to be no correlation with file type, folder location, etc. as I have seen two files
of the same type (.c) in the same directory where one has the problem and the other
does not.
I am using jEdit 4.5.pre1, daily builds from April 5, with Java 1.6.0_24 on WinXP64.
I updated to the latest daily (April 13) and still see the same problem.
| Submitted | snarum-micron - 2011-04-21 - 16:33:42z | Assigned | nobody |
|---|---|---|---|
| Priority | 5 | Category | None |
| Status | Open | Group | None |
| Resolution | None | Visibility | No |
| 2011-04-21 - 17:39:15z ezust |
is this a bug with the dirty gutter plugin or jedit itself? Can you describe the problem without using dirtygutter? |
|---|---|
| 2011-04-21 - 17:52:58z snarum-micron |
Sorry for the confusion. This has nothing to do with the DirtyGutter plugin, I was
simply noting that it seems to indicate that some lines were actually changed AFTER
the save, which is a symptom, not a cause. The problem happens with or without the
plugin turned on. |
| 2011-04-27 - 19:50:12z snarum-micron |
I am beginning to wonder if my statement was correct. I turned off the DirtyGutter plugin a couple days ago, and I don't believe I have seen this happen since. So, this may indeed be a plugin bug. I am using version 0.2 of DirtyGutter, April 5 daily build. |
| 2011-04-27 - 22:33:37z ezust |
Please describe some easy steps to reproduce with 2 test files, if possible. |
| 2011-04-28 - 05:26:26z shlomy |
This might be caused by DirtyGutter, if you use the "simple" mode (i.e. "Dirty line
provider" in the option pane is set to 'simple'). DirtyGutter (in "simple" mode only)
actually runs an undo/redo procedure every time the buffer is saved in order to build
its own support for undo/redo - since the core does not expose the undo list to plugins. I will try to check & fix this soon, but in the mean time you can switch to "Diff" mode - which does not perform any undo/redo, but instead compares the buffer to the file on disk. |
| 2011-04-28 - 14:48:20z ezust |
perhaps diff mode should be the default in DirtyGutter for future versions until this
is fixed? |
| 2011-04-29 - 17:08:27z ezust |
Ignore previous comment. It seems DirtyGutter has a few bugs fixed in git and has
not been released yet. Try out the latest daily build here: http://www.tellurianring.com/projects/jedit-daily/index.php?dir=DirtyGutter%2F2011-04-04_23-56-14%2F See if you have the same problem. |
| 2011-04-29 - 18:32:37z shlomy |
Thanks Alan. I just tried to reproduce this, but couldn't. Instead, I got another strange behavior of "save all" which is not related to DirtyGutter - it happens even when DirtyGutter is not installed. I have two buffers open. I make a change to one of them and select 'Save all'. I get a dialog asking me to verify that I want to save all. I answer 'Yes'. Then, a new untitled buffer is created automatically, and the "save all" action that I started before tried to save it, and opens the "save file as" dialog because this buffer is untitled... Neither of this should happen as a result of 'save all'. |
| 2011-04-29 - 18:35:24z shlomy |
Steve, I just thought of something. Can you turn on the macro recorder,and try to
reproduce this? Then you can submit the macro, it may give a clue of what happened. Alternatively, it would be useful to have a screencast showing the problem. |
| 2011-05-06 - 19:27:02z snarum-micron |
Sorry, I've been offline for a week. I've been using the daily build of DirtyGutter
plugin, using Diff mode, for several days and have not seen this problem. I'll switch
back to simple mode (temporarily, as I find I like the Diff mode better now) and see
if I can reproduce the problem. If not, do you want me to revert to the prior daily
I was using so I can capture the macro? |
| 2011-05-07 - 14:25:35z shlomy |
No need, thanks. If you can't reproduce the problem, it is probably fixed. |
| 2011-05-09 - 14:41:21z snarum-micron |
Yes, simple mode still has the bug with the May 5th daily. |
| 2011-05-09 - 15:31:47z shlomy |
Can you capture a macro until you get the buggy behavior? Also, can you specify the steps to reproduce? Thanks. |
| 2011-05-09 - 18:23:57z snarum-micron |
Steps to reproduce: Select 'Simple' mode in the Dirty Gutter plugin options Restart jEdit <=== Yes, I have found this step to be necessary, reload didn't seem to work the same. Open a bunch of buffers and edit several of them without saving. Issue the Save All command. Some of the time this works, other times it fails. Observe that one or more buffers is still "dirty" (I can spot it quickly because the Buffer Tabs plugin shows me dirty vs. clean on every buffer.) Of the buffers that are NOT marked dirty, observe that some are saved, but without some of the changes. In these buffers, issuing the Redo command will redo the edits that are missing. Of the buffers that ARE marked dirty, some will be in various states of editing, with some edits missing but others present. Again, Redo will bring the buffer up to where it was when you issued Save All. I will turn on macro record and post the result under separate cover. |
| 2011-05-09 - 19:43:43z snarum-micron |
Test1.zip source files, macro and 1st half of screenies |
|---|---|
| 2011-05-09 - 19:44:05z snarum-micron |
Test2.zip 2nd half of screenines |