diff options
author | joe <rbo@gmx.us> | 2025-08-27 14:56:57 +0200 |
---|---|---|
committer | joe <rbo@gmx.us> | 2025-08-27 14:56:57 +0200 |
commit | 86d9a8a21756344856617156c36113aa848671c4 (patch) | |
tree | 2af7382dba86ad744592cd304049a2ff55949edb /src/c_utils.go | |
parent | k (diff) | |
download | hardflip-86d9a8a21756344856617156c36113aa848671c4.tar.gz hardflip-86d9a8a21756344856617156c36113aa848671c4.tar.bz2 hardflip-86d9a8a21756344856617156c36113aa848671c4.tar.xz hardflip-86d9a8a21756344856617156c36113aa848671c4.tar.zst hardflip-86d9a8a21756344856617156c36113aa848671c4.zip |
fzf in progress
Diffstat (limited to 'src/c_utils.go')
-rw-r--r-- | src/c_utils.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/c_utils.go b/src/c_utils.go index 3ea4ee8..af6b4af 100644 --- a/src/c_utils.go +++ b/src/c_utils.go @@ -157,6 +157,15 @@ func c_error_mode(msg string, err error, ui *HardUI) { ui.err[ERROR_ERR] = err_str } +// c_resume_or_die attempts to resume a previously suspended tcell.Screen +// it will kill the program using c_die() in case of resume failure +func c_resume_or_die(ui *HardUI) { + if err := ui.s.Resume(); err != nil { + ui.s.Fini() + c_die("view", err) + } +} + // c_encrypt_str encrypts a string with the given gpgkey func c_encrypt_str(str string, gpg string) (string, error) { if len(gpg) == 0 || gpg == "plain" { |