myadm

Simple MySQL client for the terminal
git clone git://git.bitsmanent.org/myadm
Log | Files | Refs | README | LICENSE

commit 1e099510ed549b07fc10a8f3fe4cb0843a389c1d
parent 1b6026b11b944ff398ea0b64400c84557ef76d11
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Tue,  1 Mar 2016 21:26:21 +0100

Clean up

Diffstat:
Mcore.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/core.c b/core.c @@ -195,10 +195,11 @@ setmode(const Arg *arg) { v->choice = copyitem(getitem()); selview = v; - v->mode->func(); + selview->mode->func(); - status("[%s]", selview->mode->name); - //stfl_set(selview->form, L"pos", 0); + if(selview->choice && selview->choice->nfields) + status("[%s]", selview->choice->fields[0]); + stfl_set(selview->form, L"pos", 0); } void @@ -303,6 +304,7 @@ mysql_listview(MYSQL_RES *res) { selview->form = stfl_create(L"<items.stfl>"); stfl_modify(selview->form, L"items", L"replace_inner", L"vbox"); /* clear */ + /* XXX actually in reverse order */ for(item = selview->items; item; item = item->next) stfl_putitem(item); }