From 837212ebdebb4fe7a9d3c6f3fd8b822928702acd Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 10 Aug 2023 13:49:08 +0200 Subject: [PATCH] remove some useless fields from textline widgets (#1174) --- src/hu_lib.c | 5 +---- src/hu_lib.h | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/hu_lib.c b/src/hu_lib.c index e49d6bb4..4fd2ee0a 100644 --- a/src/hu_lib.c +++ b/src/hu_lib.c @@ -478,7 +478,6 @@ void HUlib_initMText(hu_mtext_t *m, int x, int y, patch_t ***font, int i; m->nl = 0; - m->nr = 0; m->cl = -1; //jff 4/28/98 prepare for pre-increment m->x = x; m->on = on; @@ -605,7 +604,6 @@ void HUlib_eraseMText(hu_mtext_t *m) void HUlib_initIText(hu_itext_t *it, int x, int y, patch_t ***font, char *cr, boolean *on) { - it->lm = 0; // default left margin is start of text it->on = on; it->laston = true; HUlib_initTextLine(&it->l, x, y, font, cr, NULL); @@ -624,7 +622,7 @@ void HUlib_initIText(hu_itext_t *it, int x, int y, patch_t ***font, static void HUlib_delCharFromIText(hu_itext_t *it) { - if (it->l.len != it->lm) + if (it->l.len > 0) HUlib_delCharFromTextLine(&it->l); } @@ -640,7 +638,6 @@ static void HUlib_delCharFromIText(hu_itext_t *it) void HUlib_resetIText(hu_itext_t *it) { - it->lm = 0; HUlib_clearTextLine(&it->l); } diff --git a/src/hu_lib.h b/src/hu_lib.h index 02a0e182..e68df5fb 100644 --- a/src/hu_lib.h +++ b/src/hu_lib.h @@ -109,7 +109,6 @@ typedef struct { hu_textline_t l[HU_MAXMESSAGES]; // text lines to draw int nl; // height in lines - int nr; // total height in rows int cl; // current line number int x; // current line x @@ -127,9 +126,6 @@ typedef struct { hu_textline_t l; // text line to input on - // left margin past which I am not to delete characters - int lm; - // pointer to boolean stating whether to update window boolean* on; boolean laston; // last value of *->on;