48 lines
1.2 KiB
Text
48 lines
1.2 KiB
Text
$NetBSD: patch-ab,v 1.3 2000/10/16 01:34:39 wiz Exp $
|
|
|
|
--- screen.c.orig Tue Jun 6 20:53:24 2000
|
|
+++ screen.c
|
|
@@ -6,6 +6,7 @@
|
|
struct window info_win;
|
|
static chtype *curs_buf;
|
|
extern int screen_cols;
|
|
+int old_cur_vis = 1; /* this is the cursor mode, set to normal as default */
|
|
|
|
char *help_line[] =
|
|
{
|
|
@@ -38,7 +39,7 @@
|
|
}
|
|
|
|
wattrset(users_list.wd, A_BOLD);
|
|
- printf("\033[?25l"); /* disable cursor */
|
|
+ old_cur_vis = curs_set(0); /* disable cursor */
|
|
|
|
start_color();
|
|
init_pair(1,COLOR_CYAN,COLOR_BLACK);
|
|
@@ -58,6 +59,7 @@
|
|
|
|
cbreak();
|
|
nodelay(stdscr,TRUE);
|
|
+ keypad(info_win.wd, TRUE);
|
|
scrollok(users_list.wd,TRUE);
|
|
noecho();
|
|
}
|
|
@@ -67,7 +69,7 @@
|
|
werase(help_win.wd);
|
|
wrefresh(help_win.wd);
|
|
endwin();
|
|
- printf("\033[?25h"); /* enable cursor */
|
|
+ curs_set(old_cur_vis); /* enable cursor */
|
|
}
|
|
|
|
void cursor_on(struct window *w, int line)
|
|
@@ -116,7 +118,8 @@
|
|
if (i > w->cols) break;
|
|
if (*p < 17){
|
|
i--;
|
|
- waddnstr(w->wd, q, p - q);
|
|
+ if (p - q != 0)
|
|
+ waddnstr(w->wd, q, p - q);
|
|
wattrset(w->wd, COLOR_PAIR(*p));
|
|
q = p + 1;
|
|
}
|