aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-16 05:12:10 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-16 05:12:10 -0400
commit5a091652ff1ba3a0af75886c4add476e2b6817da (patch)
tree0c11f48e31ab992ca1a5afcd1e093359b8920966
parent811e731b00266b64bd8eea5150b483f23ff598c3 (diff)
downloadfujinet-chat-5a091652ff1ba3a0af75886c4add476e2b6817da.tar.gz
Editbox-only mode, Start+E.
-rw-r--r--TODO2
-rw-r--r--doc/ui_keys.txt6
-rw-r--r--font_dl.asm10
-rw-r--r--src/addrs.c1
-rw-r--r--src/addrs.h3
-rw-r--r--src/irc.c10
6 files changed, 29 insertions, 3 deletions
diff --git a/TODO b/TODO
index ca8dc4b..2aeba71 100644
--- a/TODO
+++ b/TODO
@@ -12,6 +12,8 @@ FujiChat features, we're almost at parity!
Other stuff:
+- Idea inspired by pusakat: after joining channels on connect, it
+ should switch to the first one (screen 3).
- Status indicators # M J etc should disappear at some point. When
the user switches windows. Also maybe there should be a timer.
- ^U works, but is slow (calls backspace() in a loop, which does a
diff --git a/doc/ui_keys.txt b/doc/ui_keys.txt
index dd9b9e8..7944531 100644
--- a/doc/ui_keys.txt
+++ b/doc/ui_keys.txt
@@ -17,11 +17,11 @@ N - in channel screen, do a /names #channel. in [server], last
P - in a query screen, do a /ping <nick>. in [private], last
nick who PMed. no effect elsewhere.
T - /topic #channel
+E - show full editbox (instead of screen).
+Ctrl-X - in a channel screen, /part the channel and close the
+ screen. no effect elsewhere.
Future plans:
-E - show full editbox (instead of screen).
J - join last channel you were invited to.
-Ctrl-X - in a channel screen, /part the channel and close the
- screen. no effect elsewhere.
? - Show help (also the Help key by itself will do this).
diff --git a/font_dl.asm b/font_dl.asm
index 70222e3..4f528a7 100644
--- a/font_dl.asm
+++ b/font_dl.asm
@@ -10,6 +10,7 @@ scr1_top
*= * + 1000
scr2_top
*= * + 1000
+edbox_only_dlist = *
; can't cross a 4K boundary...
*= $9000
@@ -77,3 +78,12 @@ dl_status_lms
.byte $41 ; JVB
.word dlist_bot
+ *= edbox_only_dlist
+ .byte $70, $70, $30 ; 2 8-line blanks, 1 4-line blank
+ .byte $70, $70, $70, $70, $70, $70, $70, $70
+ .byte $42
+ .word $0600 ; edit_box from addrs.c
+ .byte $02, $02, $02, $02, $02
+ .byte $41
+ .word edbox_only_dlist
+
diff --git a/src/addrs.c b/src/addrs.c
index 8df94f5..b9f0921 100644
--- a/src/addrs.c
+++ b/src/addrs.c
@@ -9,6 +9,7 @@ u16 *dlist_status_lms = u16p(0xbfee);
u8 *dlist_last_line = u8p(0xbff0);
u8 *edit_box = u8p(0x0600); /* up to 256 bytes (page 6) */
+u8 *edbox_only_dlist = u8p(0x8fb8);
u8 *rx_buf = u8p(0xa000); /* 512 bytes */
u8 *tx_buf = u8p(0xa200); /* 512 bytes */
diff --git a/src/addrs.h b/src/addrs.h
index 1aca8be..67a59c8 100644
--- a/src/addrs.h
+++ b/src/addrs.h
@@ -24,6 +24,9 @@ extern u8 *dlist_last_line;
/* only one of these (not one per screen) */
extern u8 *edit_box;
+/* display list for Start+E (show only edbox) mode. */
+extern u8 *edbox_only_dlist;
+
/* used for scrollback */
extern u8 *screen_top_addrs[7];
diff --git a/src/irc.c b/src/irc.c
index 29c250d..676c421 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -853,6 +853,13 @@ void ui_ping(void) {
cmd_ctcp_ping(nick);
}
+static void toggle_edbox_only(void) {
+ if(OS.sdlst == edbox_only_dlist)
+ scr_end_scrollback();
+ else
+ OS.sdlst = edbox_only_dlist;
+}
+
static void start_keystroke(void) {
char i, s;
@@ -928,6 +935,9 @@ static void start_keystroke(void) {
case 't':
send_cur_chan_cmd("TOPIC");
break;
+ case 'e':
+ toggle_edbox_only();
+ break;
case 's':
edbox_hide();
/* fall thru */