Preface
Currently, I'm using History::display to display the navigation history for my editor, and I find it confusing during branch switching.
Steps to reproduce
For example, say we start with the following tree:
* 1-3 [HEAD] src/position.rs
* 1-2 src/soft_wrap.rs
| * 0-3 src/quickfix_list.rs
| * 0-2 src/context.rs
|/
* 1-1 src/components/editor.rs
* 1-0 [SAVED]
Expected outcome
And when I switched to [0-3], I expect it to display as follows (only [HEAD] is moved):
* 1-3 src/position.rs
* 1-2 src/soft_wrap.rs
| * 0-3 [HEAD] src/quickfix_list.rs
| * 0-2 src/context.rs
|/
* 1-1 src/components/editor.rs
* 1-0 [SAVED]
Actual outcome
However, it surprised me by totally modifying the tree, specifically:
- Making branch
0 the main trunk
- Renaming entries
1-1 and 1-0, to 0-1 and 0-0 respectively
* 0-3 [HEAD] src/quickfix_list.rs
* 0-2 src/context.rs
| * 1-3 src/position.rs
| * 1-2 src/soft_wrap.rs
|/
* 0-1 src/components/editor.rs
* 0-0 [SAVED]
Preface
Currently, I'm using
History::displayto display the navigation history for my editor, and I find it confusing during branch switching.Steps to reproduce
For example, say we start with the following tree:
Expected outcome
And when I switched to
[0-3], I expect it to display as follows (only[HEAD]is moved):Actual outcome
However, it surprised me by totally modifying the tree, specifically:
0the main trunk1-1and1-0, to0-1and0-0respectively