Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
6aee21f4
Commit
6aee21f4
authored
18 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Steal DMs pretty from sbbsedit.js
parent
855cbb8a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/fseditor.js
+41
-14
41 additions, 14 deletions
exec/fseditor.js
with
41 additions
and
14 deletions
exec/fseditor.js
+
41
−
14
View file @
6aee21f4
...
...
@@ -3,6 +3,7 @@
load
(
"
sbbsdefs.js
"
);
const
REVISION
=
"
$Revision$
"
.
split
(
'
'
)[
1
];
var
line
=
new
Array
();
var
quote_line
=
new
Array
();
var
xpos
=
0
;
/* Current xpos of insert point */
...
...
@@ -11,8 +12,8 @@ var last_xpos=-1; /* The xpos you'd like to be at. -1 when not valid
var
ypos
=
0
;
/* Current index into line[] of insert point */
var
insert
=
true
;
/* Insert mode */
var
topline
=
0
;
/* Index into line[] of line at edit_top */
var
edit_top
=
2
;
/* First line of edit window */
var
edit_bottom
=
console
.
screen_rows
;
/* Last line of edit window */
var
edit_top
=
5
;
/* First line of edit window */
var
edit_bottom
=
console
.
screen_rows
-
1
;
/* Last line of edit window */
var
lines_on_screen
=
edit_bottom
-
edit_top
+
1
;
/* Height of edit window */
var
curattr
=
7
;
/* Current attribute */
var
colour_box_displayed
=
0
;
/* Row the colour box is displayed
...
...
@@ -26,6 +27,13 @@ var quote_sep_pos=0; /* Line number the quote seperator is displayed on */
var
quote_ontop
=
false
;
/* true if quote window is at the top */
var
quote_top
;
/* Line number of the first quote line */
var
quote_bottom
;
/* Line number of the last quote line */
var
drop_file
;
var
info
;
// Message header display format
var
hdr_fmt
=
"
\
1b
\
1h%-4s
\
1n
\
1b:
\
1h
\
1c%.60s
\
1>
\r\n
"
;
var
stat_fmt
=
"
\
1h
\
1w
\
0014 FSEditor v
"
+
REVISION
+
"
- Type
\
1yCTRK-K
\
1w for help %s
\
1>
\
1n
"
;
var
subj
,
to
,
from
;
function
Line
()
{
...
...
@@ -196,20 +204,11 @@ function set_cursor()
var
lastinsert
=
false
;
function
status_line
()
{
console
.
gotoxy
(
1
,
1
);
console
.
attributes
=
7
;
if
(
insert
)
console
.
write
(
"
Insert Mode
"
);
else
console
.
write
(
"
Overwrite Mode
"
);
console
.
gotoxy
(
1
,
console
.
screen_rows
);
printf
(
stat_fmt
,(
insert
?
"
Insert Mode
"
:
"
Overwrite Mode
"
));
console
.
attributes
=
curattr
;
console
.
write
(
"
Current Colour
"
);
console
.
attributes
=
7
;
console
.
write
(
"
"
);
console
.
attributes
=
WHITE
;
console
.
write
(
"
CTRL-K
"
);
console
.
attributes
=
7
;
console
.
write
(
"
to list keybindings
"
);
console
.
attributes
=
16
;
console
.
cleartoeol
();
set_cursor
();
}
...
...
@@ -694,6 +693,25 @@ function draw_colour_box()
function
redraw_screen
()
{
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
);
/* Display tab line */
for
(
i
=
0
;
i
<
(
console
.
screen_columns
-
1
);
i
++
)
{
if
(
i
&&
(
i
%
8
)
==
0
)
{
if
((
i
%
(
8
*
2
))
==
0
)
{
console
.
attributes
=
CYAN
|
HIGH
;
console
.
print
(
'
|
'
);
}
else
console
.
print
(
ascii
(
254
));
}
else
{
console
.
attributes
=
YELLOW
|
HIGH
;
console
.
print
(
ascii
(
250
));
}
}
if
(
colour_box_displayed
)
draw_colour_box
();
if
(
graphics_box_displayed
)
...
...
@@ -1767,6 +1785,15 @@ if(f.open("r",false)) {
}
if
(
line
.
length
==
0
)
line
.
push
(
new
Line
());
drop_file
=
new
File
(
system
.
node_dir
+
"
editor.inf
"
);
if
(
drop_file
.
exists
&&
drop_file
.
open
(
"
r
"
))
{
info
=
drop_file
.
readAll
();
delete
drop_file
;
subj
=
info
[
0
];
to
=
info
[
1
];
from
=
info
[
3
];
}
edit
(
use_quotes
);
console
.
ctrlkey_passthru
=
oldpass
;
bbs
.
sys_status
=
old_status
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment