Sublime Forum

[Feature request] On move_commit, update which commit is selected

#1

Now that I have bound keys to move_commit in both directions, I’d like to be able to press those keys repeatedly to move a single commit up and down the graph.

Unfortunately, that doesn’t quite work because of the following behavior. Suppose you have commits:
A
B
C
D

and suppose you select B then invoke move_commit with down: true. The postcondition of that operation is that the commits are in the order below, with C selected:
A
C
B
D

I’d rather have B selected.

0 Likes

#2

You might be able to pull that off with macros, but I don’t know if macros are currently supported in Sublime Merge.

i.e.:

  1. create a macro to:
    • run the move_commit command
    • run the move command with args {"by": "lines", "forward": true} (false for up)
  2. bind new macro to a keyboard shortcut

Experiment with Sublime Text macros to figure out how to create & bind macros & then try it out in Sublime Merge.

0 Likes

#3

Thanks! That’s a great suggestion.

But I’d really prefer that the behavior be built into the move_commit command itself. I think that if a selected commit moves, then the same commit ought to remain selected as a result of the move.

0 Likes

#4

I would agree with that. Feel free to create an enhancement request in the official issue tracker.

0 Likes

#5

Done: Issue 495.

0 Likes