#1479 Undo with multi-selection ignores the main selection

Feature_Request
open
2
2013-05-23
2013-05-23
No

Say I create n selections, in order from a low position to a large one, and call SetMainSelection(0). As I type, the first caret is in the view, which is what I want. But if I undo, or redo, the view shows the last selection. I would expect that Scintilla can associate the main-selection with an undo group working on a set of selections, even through multiple undo/redo sequences.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2013-05-23

    Selection data is view-specific and is not stored in the undo history at all.

     
  • Eric Promislow

    Eric Promislow - 2013-05-23

    The workaround is straightforward, so I'm fine marking this bug WONTFIX or BYDESIGN

     
  • Eric Promislow

    Eric Promislow - 2013-05-23

    Whoa. My mistake. The workaround for the multi-selection UNDOs was straightforward, but so was the patch. This one's hard, and I've seen it before -- view-state is not part of the undo stack, and it's hard for our application to maintain it as well.

     
  • Neil Hodgson

    Neil Hodgson - 2013-05-23
    • labels: --> scintilla, undo
    • assigned_to: Neil Hodgson
    • Group: Bug --> Feature_Request
    • Priority: 5 --> 2
     
  • Neil Hodgson

    Neil Hodgson - 2013-05-23

    Its quite reasonable to include selection data in the undo stack but it would have to be properly thought through and should be optional.

    There are issues like whether its attached only to modifications or whether other movements are remembered. Also how this applies when there are multiple views: do selection events get remembered only for the view they occur in? This issue is way down my list of things that might be worked on in the distant future.

     

Log in to post a comment.