summaryrefslogtreecommitdiffstats
path: root/pkg/gui/recent_repos_panel.go
AgeCommit message (Collapse)Author
2020-08-23refactor how we handle different modesJesse Duffield
2020-08-15more removing of gJesse Duffield
2020-03-29reset state on each Run() callJesse Duffield
2020-02-15remove old createMenu functionJesse Duffield
2020-02-15refactor recent repos menu panelJesse Duffield
2019-03-23Rely on model rather than view to focus a pointJesse Duffield
Currently when we want to focus a point on a view (i.e. highlight a line and ensure it's within the bounds of a view's box, we use the LinesHeight method on the view to work out how many lines in total there are. This is bad because for example if we come back from editing a file, the view will have no contents so LinesHeight == 0, but we might be trying to select line 10 because there are actual ten things we expect to be rendered already. This causes a crash when e.g. 10 is greater than the height of the view. So we need to pass in to our FocusPoint method the actual number of items we want to render, rather than having the method rely on the LinesHeight, so that the method knows to scroll a bit before setting the cursor's y position. Unfortunately this makes for some awkward code with our current setup. We don't have a good interface type on these state objects so we now need to explicitly obtain the len() of whatever array we're rendering. In the case of the menu panel this is even more awkward because the items list is just an interface{} and it's not easy to get the list of that, so now when we instantiate a menu we need to pass in the count of items as well. The better solution would be to define an interface with a getItems and getLength method and have all these item arrays become structs implementing the interface, but I am too lazy to do this right now :)
2019-02-18rename any commitJesse Duffield
2019-02-16consider whether the view has focus when rendering the contents of a viewJesse Duffield
2019-02-11Merge branch 'master' into feature/rebasingJesse Duffield
2018-12-11Make merge panel its own panelJesse Duffield
2018-12-10Made gobot happymjarkk
2018-12-10Not always git fetchmjarkk
2018-12-10Better name for this functionmjarkk
2018-12-10Fixed loop before error checkmjarkk
2018-12-06Only show private repo popup when opening repo for first timemjarkk
2018-11-30Add full stops to new comments.BlakeMScurr
2018-11-30Add simple comments to uncommented functions.BlakeMScurr
2018-09-19add recent repos menu optionJesse Duffield