aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO6
-rw-r--r--src/edbox.c4
-rw-r--r--src/edbox.h2
-rw-r--r--src/screen.c7
4 files changed, 13 insertions, 6 deletions
diff --git a/TODO b/TODO
index 3d43096..b971e11 100644
--- a/TODO
+++ b/TODO
@@ -12,12 +12,12 @@ FujiChat features, we're almost at parity!
Other stuff:
+- Bug: *no idea* how this happened. I typed /quit, then reconnected,
+ and got "USER: not enough parameters" from the server. Can't
+ reproduce.
- Bug: if you're in screen 7, and you press start+7, the character
at position (16,0) gets overwritten with a space (which might
be 0x20 or 0x00, they're both "spaces").
-- Bug: when you're typing in the editbox and text comes in on
- another screen, the editbox gets hidden (not harmful, pressing
- a key lets you continue typing, but it's annoying).
- In the config, under SDX, saying "N" to "Settings OK" and then
reloading the config causes screen corruption (reported by
TheDoctor, not tried it myself).
diff --git a/src/edbox.c b/src/edbox.c
index 7c9715d..1b56e5c 100644
--- a/src/edbox.c
+++ b/src/edbox.c
@@ -8,7 +8,7 @@
/* TODO: tab completion */
-// static int edbox_visible = 0; /* don't think we'll ever need it */
+int edbox_visible = 0;
static u16 edbox_pos; /* range 0 to EDBOX_SIZE - 1 */
static u16 edbox_len; /* idem */
@@ -39,10 +39,12 @@ void edbox_show(void) {
scr_waitvcount(116);
*dlist_status_lms = addr;
+ edbox_visible = 1;
show_cursor();
}
void edbox_hide(void) {
+ edbox_visible = 0;
scr_refresh();
}
diff --git a/src/edbox.h b/src/edbox.h
index 548dc87..c919ee9 100644
--- a/src/edbox.h
+++ b/src/edbox.h
@@ -4,6 +4,8 @@
#define EDBOX_SIZE 240
+extern int edbox_visible;
+
/* clear the contents of the edit box (whether it's visible or not) */
void edbox_clear(void);
diff --git a/src/screen.c b/src/screen.c
index 5852208..2b56808 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3,6 +3,7 @@
#include "addrs.h"
#include "screen.h"
+#include "edbox.h"
#define SDLST ((u16 *)0x0230)
@@ -157,8 +158,10 @@ void scr_show_status(char s) {
*p++ = sc;
}
- scr_waitvcount(112);
- *dlist_status_lms = (u16)status_boxes[s];
+ if(!edbox_visible) {
+ scr_waitvcount(112);
+ *dlist_status_lms = (u16)status_boxes[s];
+ }
}
void scr_refresh(void) {