From: ewt Date: Thu, 13 Jan 2000 23:41:18 +0000 (+0000) Subject: put the cursor in the proper place after drawing X-Git-Tag: r0-50-3~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e879b7e22ea743e307c663debe92e2a81b2a9a8;p=thirdparty%2Fnewt.git put the cursor in the proper place after drawing --- diff --git a/checkboxtree.c b/checkboxtree.c index 7b4e4da..c52483c 100644 --- a/checkboxtree.c +++ b/checkboxtree.c @@ -398,8 +398,9 @@ int ctSetItem(newtComponent co, struct items *item, enum newtFlagsSense sense) static void ctDraw(newtComponent co) { struct CheckboxTree * ct = co->data; struct items ** item; - int i, curr, j; + int i, j; char * spaces; + int currRow; if (!co->isMapped) return ; @@ -415,6 +416,7 @@ static void ctDraw(newtComponent co) { newtGotorc(co->top + i, co->left); if (*item == *ct->currItem) { SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX); + currRow = co->top + i; } else SLsmg_set_color(NEWT_COLORSET_LISTBOX); @@ -462,7 +464,7 @@ static void ctDraw(newtComponent co) { ct->sb->ops->draw(ct->sb); } - newtGotorc(co->top + curr, co->left + 1); + newtGotorc(currRow, co->left + 1); } static void ctDestroy(newtComponent co) {