Set groundwork for better disabled reasons with range select

Something dumb that we're currently doing is expecting list items
to define an ID method which returns a string. We use that when copying
items to clipboard with ctrl+o and when getting a ref name for diffing.

This commit gets us a little deeper into that hole by explicitly requiring
list items to implement that method so that we can easily use the new
helper functions in list_controller_trait.go.

In future we need to just remove the whole ID thing entirely but I'm too
lazy to do that right now.
This commit is contained in:
Jesse Duffield 2024-01-16 17:28:14 +11:00
parent a67ad44781
commit a5f3515ad8
43 changed files with 237 additions and 154 deletions

View file

@ -36,6 +36,9 @@ func NewSwitchToDiffFilesController(
c,
context,
context.GetSelectedRef,
func() ([]types.Ref, int, int) {
panic("Not implemented")
},
),
c: c,
context: context,