Jesse Duffield
cdcfeb396f
stop refreshing the screen so much
2022-01-15 14:15:41 +11:00
Jesse Duffield
1996eddd91
more efficient context diff size changing
2021-12-06 22:37:28 +11:00
DerTeta
3e3151f86a
Fix: Don't access a view if it's nil
...
The way the `if` expression in `deactivateContext` was composed,
it was possible to have it to evaluate to `true` even though the
`view` variable was `nil`.
As far as I can tell, this seems to be only possible during tests.
Nonetheless, I think the expression looks more "correct" this way.
2021-12-06 22:37:28 +11:00
Jesse Duffield
37be9dbea1
support scrolling left and right
2021-11-05 07:58:21 +11:00
Jesse Duffield
2fc1498517
some refactoring in anticipation of the graph feature
2021-11-01 10:03:49 +11:00
Jesse Duffield
652c97d239
honour options menu press
2021-09-27 19:41:38 +10:00
Jesse Duffield
393ce05860
allow focusing on command log view
2021-04-11 17:07:49 +10:00
Jesse Duffield
cf78b86cb5
more support for command log and more code reuse for contexts
2021-04-11 17:07:49 +10:00
Jesse Duffield
8c93289a72
reduce chance of deadlock by using a RW mutex on the context stack
2021-04-06 19:34:32 +10:00
Jesse Duffield
fbab5bd444
do not refresh patch panel unless commit files panel is the current side panel
2021-04-06 19:34:32 +10:00
Jesse Duffield
f4e552f982
prevent deadlocks.
...
Hard to choose between the lock with a defer unlock in an anonymous function
vs just having an explicit unlock at the end with additional unlocks before
any early returns. The former is less error prone, but the former is much more
readable, especially if the anonymous function would have needed to return
an error value.
2021-04-06 19:34:32 +10:00
Jesse Duffield
5e094c8a7c
marginally better logic for searching
2021-04-06 19:34:32 +10:00
Jesse Duffield
02f45b679f
do not double-append contexts to the stack
2021-04-06 19:34:32 +10:00
Jesse Duffield
b6ec667de0
add comment
2021-04-06 19:34:32 +10:00
Jesse Duffield
4d14af5d4b
more lint fixes
2021-04-06 19:34:32 +10:00
Jesse Duffield
d627b3bfc8
more refactoring
2021-04-06 19:34:32 +10:00
Jesse Duffield
952c62df37
fix bug where searching through view got stuck if you went over the upper bound
2021-04-06 19:34:32 +10:00
Jesse Duffield
b6cc1c9492
small refactor
2021-04-06 19:34:32 +10:00
Jesse Duffield
4fe512ff3a
test
...
type safe view access
2021-04-06 19:34:32 +10:00
Jesse Duffield
0898a7bb57
refactor
2021-04-06 19:34:32 +10:00
Jesse Duffield
fafd5234bd
refactor to get view tab context map into gui state
2021-04-06 19:34:32 +10:00
Jesse Duffield
f1d7f59e49
switching repos without restarting the gui
2021-04-06 19:34:32 +10:00
Jesse Duffield
bc9a99387f
refactor of contexts and filtering
2021-04-06 19:34:32 +10:00
Jesse Duffield
cc9293b386
add mutex to prevent crashes with merge conflicts
2021-04-02 11:09:12 +11:00
Jesse Duffield
872cf0d726
hide commit files view upon losing focus because you probably don't want it lingering anyway
2021-04-02 11:00:15 +11:00
Jesse Duffield
7d62f103e4
big refactor to give our enums actual types
2021-04-02 11:00:15 +11:00
Jesse Duffield
da3b0bf7c8
Start on supporting auto-suggestions when checking out a branch
...
switch to other fuzzy package with no dependencies
2020-11-28 20:48:17 +11:00
Jesse Duffield
682db77401
fix lint errors
2020-11-18 08:36:19 +11:00
Jesse Duffield
79e59d5460
add some safe goroutines
...
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield
7b4a0f20b2
add submodules context
2020-10-02 08:09:42 +10:00
Jesse Duffield
3b93b5dde4
make it easier to add a tab to a view
2020-10-02 08:09:42 +10:00
Jesse Duffield
c12752cf53
add mutex to views array
2020-10-01 07:01:39 +10:00
Jesse Duffield
a09bb5d4d8
better validation messages
2020-09-27 09:49:30 +10:00
Jesse Duffield
266d8bf0d5
minor fixup
2020-09-27 09:49:30 +10:00
Jesse Duffield
92183de29e
more lenient handling of views not existing
2020-09-26 19:33:22 +10:00
Jesse Duffield
077f113618
add in-built logging support for a better dev experience
2020-09-26 11:00:50 +10:00
Jesse Duffield
f172f20219
Return whether the context has a parent or not along with that parent
...
There has got to be a better way around this but if we're returning a Context
from a function (Context is an interface, not a concrete type), even if we
return nil, on the calling end it won't be equal to nil because an interface
value is a tuple of the type and the value meaning it's never itself nil,
unless both values in the tuple are nil.
So we're explicitly returning whether or not the underlying concrete type is nil.
2020-08-23 22:30:32 +00:00
Jesse Duffield
bd66162972
fix up patch manager
2020-08-23 14:29:18 +10:00
Jesse Duffield
a95fd581fd
fix logic for entering merging panel
2020-08-23 14:29:18 +10:00
Jesse Duffield
fda9f4ea7a
centralise logic for rendering options map
2020-08-23 14:29:18 +10:00
Jesse Duffield
f876d8fdc8
use constants
2020-08-23 14:29:18 +10:00
Jesse Duffield
4198bbae6c
ensure there is always a current context
2020-08-23 14:29:18 +10:00
Jesse Duffield
ade54b38c1
cleanup
2020-08-23 14:29:18 +10:00
Jesse Duffield
2c3f5be093
comment these things out because we're not using them yet
2020-08-23 14:29:18 +10:00
Jesse Duffield
5874529f43
deal with the fact that a nil wrapped in an interface is not equal to nil
2020-08-23 14:29:18 +10:00
Jesse Duffield
438abd6003
centralise code for copying to clipboard
2020-08-23 14:29:18 +10:00
Jesse Duffield
f63ec38aae
genericise creating new branches off things
2020-08-23 14:29:18 +10:00
Jesse Duffield
0ac402792b
allow getting the current item generically
2020-08-23 14:29:18 +10:00
Jesse Duffield
974c6510b8
add sub commit context
2020-08-23 14:29:18 +10:00
Jesse Duffield
2d90e1e8ee
commit files kind of generalised
2020-08-23 14:29:18 +10:00