Improvements to message quoting

This commit is contained in:
Andrew Pamment 2017-04-29 20:04:25 +10:00
parent 6205dfd0ff
commit dbd29da00d

View File

@ -499,7 +499,7 @@ char *message_editor() {
}
position_x = 0;
q_done = 1;
} else if (ch.chKeyPress == 24) {
} else if (ch.chKeyPress == 24 || ch.chKeyPress == 27) {
if (q_line_count) {
free(q_lines);
}
@ -514,6 +514,17 @@ char *message_editor() {
q_lines[q_line_count] = q_position;
q_line_count++;
q_position++;
if (q_position >= quote_lines_count) {
q_position = quote_lines_count - 1;
}
if (q_position >= q_start + 7) {
q_start = q_start + 7;
if (q_start + 7 >= quote_line_count) {
q_start = quote_line_count - 7;
}
}
redraw = 1;
}
}