From 16aac818762cad9ec24aad13d0e7cb042deaff62 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Fri, 24 Jul 2015 02:32:31 +0000 Subject: [PATCH] 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). --- exec/fseditor.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/exec/fseditor.js b/exec/fseditor.js index c2f5a33dd4..267e70edf9 100644 --- a/exec/fseditor.js +++ b/exec/fseditor.js @@ -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 subj,to,from; -function Line() +function Line(copyfrom) { var i; @@ -55,6 +55,14 @@ function Line() this.firstchar=0; /* For selection */ 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() case '\x0d': /* CR */ for(i=0; i<quote_line.length; i++) { if(quote_line[i].selected) { - line.splice(ypos,0,quote_line[i]); + line.splice(ypos,0,new Line(quote_line[i])); ypos++; if(ypos-topline >= lines_on_screen) topline++; -- GitLab