Menu

#716 Changing fold compactness and toggling fold lines

Bug
open-wont-fix
Scintilla (811)
3
2008-08-29
2008-08-29
No

Originally discussed on the Komodo community site:
http://community.activestate.com/node/2719

If I have a scintilla editor that has the "fold.compact" property set to "1", then toggle a bunch of lines to be folded/closed, now changing the "fold.compact" setting to be "0" and then unfolding these lines will cause all of the "compacted" lines to now become hidden (invisible).

It seems like the way to fix this would be to have a trigger on the "fold.compact" property to catch this event and appropriately hide/show these specially compacted lines.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2008-08-29

    Logged In: YES
    user_id=12579
    Originator: NO

    fold.compact was implemented as a long term mode and changing its state should be followed by showing all hidden lines with the white flag on and recalculating the fold state for the whole document. The bug here is that the lines inside the fold cleared their white flag so are no longer considered subordinate and so will not be shown. Triggering on a property change inside Scintilla would be messy but could be more easily done from the application.

    If you want compact folding to be more of an interactive option then the right thing to do is to always have fold.compact producing white flag information on but have a mode in Scintilla for whether this should be interpreted. Then changing the white-state-is-subordinate mode would be able to hide or show lines as desired.

    The application's change watcher could process SC_MOD_CHANGEFOLD messages that switch the white flag off by checking if the line should be shown.

     
  • Neil Hodgson

    Neil Hodgson - 2008-08-29
    • milestone: --> Bug
    • priority: 5 --> 3
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-wont-fix
     

Log in to post a comment.