From c71788a41ba55ae56f3378d42bfd63b0974f3d49 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Tue, 22 Aug 2006 17:25:04 +0000 Subject: [PATCH] If not creating a message (ie: subject is blank), assume a file is being edited and just show the filename as the header. --- exec/fseditor.js | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/exec/fseditor.js b/exec/fseditor.js index c6b192154b..b98eae79cd 100644 --- a/exec/fseditor.js +++ b/exec/fseditor.js @@ -694,12 +694,18 @@ function redraw_screen() { var last_tab='|'; status_line(); - console.gotoxy(1,1); - printf(hdr_fmt, "Subj", subj); - console.gotoxy(1,2); - printf(hdr_fmt, "To", to); - console.gotoxy(1,3); - printf(hdr_fmt, "From", from); + if(edit_top == 5) { + console.gotoxy(1,1); + printf(hdr_fmt, "Subj", subj); + console.gotoxy(1,2); + printf(hdr_fmt, "To", to); + console.gotoxy(1,3); + printf(hdr_fmt, "From", from); + } + else { + console.gotoxy(1,1); + printf(hdr_fmt, "File", subj); + } /* Display tab line */ for(i=0;i<(console.screen_columns-1);i++) { if(i && (i%8)==0) { @@ -1806,6 +1812,15 @@ if(drop_file.exists && drop_file.open("r")) { to=info[1]; from=info[3]; } +else { + subj=''; +} +if(subj=='') { + edit_top=3; + lines_on_screen=edit_bottom-edit_top+1; + subj=input_filename; + subj=subj.replace(/^.*[\\\/]/,''); +} edit(use_quotes); console.ctrlkey_passthru=oldpass; bbs.sys_status=old_status; -- GitLab