summaryrefslogtreecommitdiff
path: root/vui.c
diff options
context:
space:
mode:
Diffstat (limited to 'vui.c')
-rw-r--r--vui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vui.c b/vui.c
index f97ea71..8c4a58a 100644
--- a/vui.c
+++ b/vui.c
@@ -202,6 +202,11 @@ void vui_curs_pos(int x, int y) {
win.curs_y = y;
}
+void vui_curs_shape(VuiCursorShape sh) {
+ printf("\x1b[%d q", sh);
+ fflush(stdout);
+}
+
/* TODO: use something better than signal() */
/* does sigaction allow for a context pointer? */
static void on_resized(int signo) {
@@ -247,6 +252,7 @@ static inline int bchr_equiv(VuiBuffer *a, VuiBuffer *b, unsigned i) {
void vui_fini(void) {
vui_curs_vis(1);
+ vui_curs_shape(VUI_CURS_DEFAULT);
free_buf(&win.buf1);
free_buf(&win.buf2);
free(vui_out);
@@ -793,7 +799,7 @@ static VuiKey esc_key(u32 c) {
}
VuiKey vui_key(void) {
- int c = getk();
+ unsigned c = getk();
switch (c) {
case '\n':
return KEY_RET;