Fixed some curser offset bugs

This commit is contained in:
xavi 2024-09-05 11:40:45 -07:00
parent 2dfbc19d2c
commit 43323dbf9b

View File

@ -124,10 +124,10 @@ int print_fixed_width(const unsigned char* str){
int display_task_list(int start_col, sqlite3 *db, char* colnames, char* table, char* status){ int display_task_list(int start_col, sqlite3 *db, char* colnames, char* table, char* status){
static int max_rows = 0; static int max_rows = -1;
int rc = 0; int rc = 0;
int i = 0; int i = 0;
int num_rows = 0; int num_rows = -1;
int num_cols = 0; int num_cols = 0;
char* errmsg; char* errmsg;
const unsigned char* col_val; const unsigned char* col_val;
@ -169,7 +169,9 @@ int display_task_list(int start_col, sqlite3 *db, char* colnames, char* table, c
// Once the task list is completely printed // Once the task list is completely printed
// reset to the top of the task lists // reset to the top of the task lists
X_goup(num_rows); if (num_rows > 0){
X_goup(num_rows);
}
// if it is the last task list move down one past the longest list // if it is the last task list move down one past the longest list
if ( status == "blocked"){ if ( status == "blocked"){