#1666 DirtyGutter 0.3 causes jEdit to open closed foldings on save

closed-out-of-date
None
5
2013-10-08
2012-10-18
Bosse Iseborn
No

DirtyGutter 0.3. jEdit 4.5.0 and 4.5.1. Win7 and Solaris10. Oracle Java 1.6.0-23 and 1.6.0-35.

With DirtyGutter provider set to "Simple" (the default value), *Every* folding that you have made a change inside of (since the buffer was opened) and then closed, is re-opened *every* time you save the buffer. Also, when this happens, the buffer is also automatically scrolled to the last folding that was automatically opened (though the caret is still at the correct position).

The folding mode does not matter (indent, explicit, sidekick).

This is very annoying when editing large files with lots of nested foldings. At least it seems to work fine with provider set to "Diff", so it is not a big problem here at work anymore. (Though it took us quite some time to narrow the problem down).

Discussion

  • Bosse Iseborn
    Bosse Iseborn
    2012-10-18

    Test file

     
    Attachments
  • Bosse Iseborn
    Bosse Iseborn
    2012-10-18

    Added a sample text file.

    To reproduce:
    1. Make sure that provider is set to Simple (Plugin Options > DirtyGutter). Note that if you needed to change this, you should restart jEdit afterwards since it seems to work fine otherwise(!)
    2. Open the test file.
    3. Open Fold A, Make a change to any line in the folding, and save the file.
    4. Close Fold A, and open Fold B. Make a change to one of the last lines in the fold and save the file.
    5. Fold A is now automatically opened, and the buffer is scrolled up to Fold A. The caret however remains where you left it in Fold B (as it should be).

     
  • Alan Ezust
    Alan Ezust
    2013-02-07

    • assigned_to: nobody --> shlomy
     
    • status: open --> closed-out-of-date
     
  • I temporarily removed the "Simple" provider, as it caused many other problems as well. All the problems, including this one, resulted from complex support for undo/redo, due to lack of API in jEdit that prevent plugins from peeking into the undo list.
    I will only bring it back if/when jEdit will allow plugins to track the undo list.