Selection undo feature


When I collapse and then expand a row with CMD-9 + CMD-0 I always ends with the highest-level row being focused.

Perhaps I’m wrong here, but I was expecting these two commands ending with me in the same place as I was at the start.

You are talking about focus (as in the menu system’s Go > Focus In > Focus Out) ?

Or about selection (the position of the cursor) ?

I don’t think that ⌘0 Expand Row ever changes the selection position.

As far as I can see ⌘9 Collapse Row only changes the selection if the selected row gets hidden by the Collapse.

(In other words if the selected row is childless, and the collapse applies to its parent, hiding the selected row itself).

Wouldn’t be be left in the dark, with no selected row at all, if the cursor didn’t move to the visible parent, after its children had been hidden ?

Or about selection (the position of the cursor) ?

The position of the cursor.

My point is that if the cursor is in a child element, and I collapse it, the cursor should obviously go to the parent (this is what happens now and is correct), but if I expand back immediately, the cursor should, IMHO, go back to the child element I had the cursor in before. Instead, the cursor stays in the parent element.

Obviously if you start typing in the parent element that’s a different issue.

I wonder if other users might be surprised if an expansion resulted in a cursor movement ?

You would like the simple default (no cursor movement on expansion) to be overridden in the presence of certain types of history ? Wouldn’t you have to define a period of time during which history overrides defaults ?

(sounds perhaps a little complex ?)

(I was wondering whether we could script you a custom expand with memory of the recent past, but I don’t think that the scripting interface gives us access to cursor positions at the moment)

Do you know of any other outliners which behave in the way you describe ?

(I notice that in OmniOutliner, for example, expansion is simply expansion – no restoration of cursor positions remembered from before the parental collapse)

I agree with @complexpoint, I don’t think this would be good default behavior for the editor. It could be confusing, and it would be somewhat complex to implement.

Good question… I will add, can you explain a bit more about what you are trying to do? I imagine you might want this behavior if you are working in a child section, but then want to get a quick overview of the entire document?

If that’s the case I think a better approach would be for Bike to add some sort of separate “overview” view, that didn’t affect the expanded state of the view you are editing? Maybe?

Hi @jessegrosjean, @complexpoint,

Yeah, I don’t disagree with you.

Good question… I will add, can you explain a bit more about what you are trying to do? I imagine you might want this behavior if you are working in a child section, but then want to get a quick overview of the entire document?

Yeah, this is when this happens often.

I guess I just find it confusing when I’m navigating around the outline and if I (accidentally or on purpose) collapse a section from a child element, there’s no way to go back to where I was (cmd-z obviously doesn’t take me back), and as I mentioned trying to expand back doesn’t return me to where I was.

Not a life or death issue obviously :slight_smile:

Thank you both for the feedback.

I don’t know if I want to add this right away, but maybe “Selection Undo” would solve this? So instead of Command-z there would be a separate undo command that undid a selection change, and revealed the selection (by focus change, row expand) as necessary?

Some discussion of the various ways this might work can be found here:

If that makes sense can you edit the topic tittle to request for “Selection undo feature”.


I use Sublime Text and I’m a big fan of “soft undo”, and I think that would work here. In ST that’s ⌘-U for undo and ⌘-⇧-U.


1 Like

I’m looking for more thoughts on selection undo:

  1. Does it make sense for it to be a more general “UI” undo. So selection, expand/collapse/focus? I think that would be almost as easy.

  2. I expect the way it would work is you can undo/redo “UI” until you make an outline edit. Once you do that the UI undo stacks are cleared.

  3. Does it need a special separate command? Seems like standard undo could undo both UI and edits.

(1) and (2) make sense to me. I’m not sure if I’m following (3). I’d expect regular Undo to just revert text edits, while a UI/Soft Undo would work as you explain.

I think if someone hasn’t encountered Selection Undo they would be confused by selecting Undo and finding nothing has happened with the text and instead a view changed, for example.

1 Like