diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 14:21:17 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | fbab5bd444768b8151e76336e6070f554eec8fea (patch) | |
tree | 78c14239739b5453ac892d25d8ea36da2ad4fe8a /pkg/utils | |
parent | 12ca922a410688646cfea3289b56e0fec83aae88 (diff) |
do not refresh patch panel unless commit files panel is the current side panel
Diffstat (limited to 'pkg/utils')
-rw-r--r-- | pkg/utils/utils.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 945586001..69fe711ac 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,6 +8,7 @@ import ( "os" "path/filepath" "regexp" + "runtime" "strconv" "strings" "text/template" @@ -382,3 +383,9 @@ func SafeWithError(f func() error) error { return err } + +func StackTrace() string { + buf := make([]byte, 10000) + n := runtime.Stack(buf, false) + return fmt.Sprintf("%s\n", buf[:n]) +} |