Comment on attachment 687497
Path: adds back a newline for HTML replies
Sorry for dropping the ball on this.
Editor is a bit strange when it comes to breaks, in particular you need a break in an empty block so that you can put the caret there, so it creates a bogus break to achieve this.
However when you insert a break (e.g. by pressing Enter in an empty Compose window) this bogus break gets deleted, and the net result is that nothing happens, which is unhelpful.
Inserting a break by pressing Shift+Enter does force the insert of a break without deleting the bogus break, but there's no direct function to achieve this, and the one API point we have behaves differently in plain text compose.
So I think the best solution here is to move this extra break to the beginning of the if (reply_on_top == 1) block, with a suitable comment to the effect that the HTML editor eats the initial break.
(On an unrelated note, the code to detect a signature is over-engineered - any signature is already in aSignature at this point.)
Comment on attachment 687497
Path: adds back a newline for HTML replies
Sorry for dropping the ball on this.
Editor is a bit strange when it comes to breaks, in particular you need a break in an empty block so that you can put the caret there, so it creates a bogus break to achieve this.
However when you insert a break (e.g. by pressing Enter in an empty Compose window) this bogus break gets deleted, and the net result is that nothing happens, which is unhelpful.
Inserting a break by pressing Shift+Enter does force the insert of a break without deleting the bogus break, but there's no direct function to achieve this, and the one API point we have behaves differently in plain text compose.
So I think the best solution here is to move this extra break to the beginning of the if (reply_on_top == 1) block, with a suitable comment to the effect that the HTML editor eats the initial break.
(On an unrelated note, the code to detect a signature is over-engineered - any signature is already in aSignature at this point.)