diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-01-12 15:50:56 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-01-12 15:50:56 +0100 |
| commit | 099002715d30af646d4582ac2b14322dae3f04d9 (patch) | |
| tree | 459d79b4e9121e5b6d84eea757cc17400366f075 /src/tui.h | |
| parent | 44070fb5518e2b54748d58da5a5c61f476ef8700 (diff) | |
| download | tmus-099002715d30af646d4582ac2b14322dae3f04d9.tar.gz tmus-099002715d30af646d4582ac2b14322dae3f04d9.zip | |
Refactor error handling
Diffstat (limited to 'src/tui.h')
| -rw-r--r-- | src/tui.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -14,9 +14,7 @@ void tui_init(void); void tui_deinit(void); - bool tui_update(void); -void tui_restore(void); extern struct pane *cmd_pane, *tag_pane, *track_pane; extern struct pane *pane_sel, *pane_after_cmd; @@ -30,3 +28,15 @@ extern struct listnav track_nav; extern char *cmd_status; extern int cmd_status_uptime; +static inline bool +tui_enabled(void) +{ + return !isendwin(); +} + +static inline void +tui_restore(void) +{ + if (!isendwin()) + endwin(); +} |
