diff options
author | Daniel Lange <DLange@git.local> | 2022-05-02 16:04:22 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2022-05-02 16:04:22 +0200 |
commit | 2f0332b75397ad5240a429d72203f0531011b6a9 (patch) | |
tree | 4782d4b8d0c43f3e6faa1bbbe95816a09e815e67 /FunctionBar.c | |
parent | 93c96b12c9cb349b762d38d69568d65cd3e4fbfd (diff) | |
parent | 1b805a31720727008b32b1129a167758519fd4db (diff) | |
download | debian_htop-2f0332b75397ad5240a429d72203f0531011b6a9.tar.gz debian_htop-2f0332b75397ad5240a429d72203f0531011b6a9.tar.bz2 debian_htop-2f0332b75397ad5240a429d72203f0531011b6a9.zip |
Update upstream source from tag 'upstream/3.2.0'
Update to upstream version '3.2.0'
with Debian dir 5ce130e9471b77941bbd217b5ea8b7b3419a91c6
Diffstat (limited to 'FunctionBar.c')
-rw-r--r-- | FunctionBar.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/FunctionBar.c b/FunctionBar.c index fc3304a..0850037 100644 --- a/FunctionBar.c +++ b/FunctionBar.c @@ -88,11 +88,12 @@ void FunctionBar_setLabel(FunctionBar* this, int event, const char* text) { } } -void FunctionBar_draw(const FunctionBar* this) { - FunctionBar_drawExtra(this, NULL, -1, false); +int FunctionBar_draw(const FunctionBar* this) { + return FunctionBar_drawExtra(this, NULL, -1, false); } -void FunctionBar_drawExtra(const FunctionBar* this, const char* buffer, int attr, bool setCursor) { +int FunctionBar_drawExtra(const FunctionBar* this, const char* buffer, int attr, bool setCursor) { + int cursorX = 0; attrset(CRT_colors[FUNCTION_BAR]); mvhline(LINES - 1, 0, ' ', COLS); int x = 0; @@ -113,18 +114,20 @@ void FunctionBar_drawExtra(const FunctionBar* this, const char* buffer, int attr } mvaddstr(LINES - 1, x, buffer); x += strlen(buffer); + cursorX = x; } attrset(CRT_colors[RESET_COLOR]); if (setCursor) { - CRT_cursorX = x; curs_set(1); } else { curs_set(0); } currentLen = x; + + return cursorX; } void FunctionBar_append(const char* buffer, int attr) { |