Skip to content
Snippets Groups Projects
Commit 16aac818 authored by deuce's avatar deuce
Browse files

Copy the quote line from the quote buffer into the message rather than

inserting the quote line as-is.

The inerting method would mean that edits made to a quoted line were also
made in the quote buffer (which is supposed to be read-only).
parent a23435c7
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ var stat_attr = 0x1f; ...@@ -39,7 +39,7 @@ var stat_attr = 0x1f;
var stat_fmt = "\1h\1w\0014 FSEditor v" + REVISION + " - Type \1yCTRL-K\1w for help %s\1>\1n"; var stat_fmt = "\1h\1w\0014 FSEditor v" + REVISION + " - Type \1yCTRL-K\1w for help %s\1>\1n";
var subj,to,from; var subj,to,from;
function Line() function Line(copyfrom)
{ {
var i; var i;
...@@ -55,6 +55,14 @@ function Line() ...@@ -55,6 +55,14 @@ function Line()
this.firstchar=0; this.firstchar=0;
/* For selection */ /* For selection */
this.selected=false; this.selected=false;
if (copyfrom != undefined) {
this.text = copyfrom.text;
this.attr = copyfrom.attr;
this.hardcr = copyfrom.hardcr;
this.kludged = copyfrom.kludged;
this.firstchar = copyfrom.firstchar;
this.selected = copyfrom.selected;
}
} }
/* /*
...@@ -1314,7 +1322,7 @@ function quote_mode() ...@@ -1314,7 +1322,7 @@ function quote_mode()
case '\x0d': /* CR */ case '\x0d': /* CR */
for(i=0; i<quote_line.length; i++) { for(i=0; i<quote_line.length; i++) {
if(quote_line[i].selected) { if(quote_line[i].selected) {
line.splice(ypos,0,quote_line[i]); line.splice(ypos,0,new Line(quote_line[i]));
ypos++; ypos++;
if(ypos-topline >= lines_on_screen) if(ypos-topline >= lines_on_screen)
topline++; topline++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment