summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2011-09-08 01:10:58 +0000
committerHisham Muhammad <hisham@gobolinux.org>2011-09-08 01:10:58 +0000
commit3f3213b2e215ba947e1155cd591f6f73e1ffce76 (patch)
tree12ae948d8d7980bbbb93898933bd51223e0f3e57
parent60e510609886543e9aec44ec7909d1426129a47a (diff)
show cursor when function bar allows typing an entry.
-rw-r--r--CRT.c2
-rw-r--r--CRT.h2
-rw-r--r--FunctionBar.c6
3 files changed, 9 insertions, 1 deletions
diff --git a/CRT.c b/CRT.c
index 9c3d9490..949b543e 100644
--- a/CRT.c
+++ b/CRT.c
@@ -118,6 +118,8 @@ int CRT_colorScheme = 0;
int CRT_colors[LAST_COLORELEMENT] = { 0 };
+int CRT_cursorX = 0;
+
char* CRT_termType;
void *backtraceArray[128];
diff --git a/CRT.h b/CRT.h
index 08b5d9a5..55728c87 100644
--- a/CRT.h
+++ b/CRT.h
@@ -119,6 +119,8 @@ extern int CRT_colorScheme;
extern int CRT_colors[LAST_COLORELEMENT];
+extern int CRT_cursorX;
+
char* CRT_termType;
void *backtraceArray[128];
diff --git a/FunctionBar.c b/FunctionBar.c
index ef643462..ef0fcba2 100644
--- a/FunctionBar.c
+++ b/FunctionBar.c
@@ -111,9 +111,13 @@ void FunctionBar_drawAttr(const FunctionBar* this, char* buffer, int attr) {
mvaddstr(LINES-1, x, this->functions[i]);
x += strlen(this->functions[i]);
}
- if (buffer != NULL) {
+ if (buffer) {
attrset(attr);
mvaddstr(LINES-1, x, buffer);
+ CRT_cursorX = x + strlen(buffer);
+ curs_set(1);
+ } else {
+ curs_set(0);
}
attrset(CRT_colors[RESET_COLOR]);
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy