mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Should fix a small bug with colour starting at the front of a newline in the editor.
This commit is contained in:
parent
60d5836959
commit
336275220b
1 changed files with 3 additions and 1 deletions
|
@ -530,7 +530,7 @@ int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*flow && i < high) {
|
while (*flow && i < high) {
|
||||||
while (*flow && strchr("\n\r\f\t\v ", *flow)) {
|
while (*flow && strchr("\n\r\f\v ", *flow)) {
|
||||||
if (*flow == '\n' && !pass_line)
|
if (*flow == '\n' && !pass_line)
|
||||||
if (i++ >= high) {
|
if (i++ >= high) {
|
||||||
pass_line = 1;
|
pass_line = 1;
|
||||||
|
@ -545,6 +545,8 @@ int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned
|
||||||
if (*flow == '\t') {
|
if (*flow == '\t') {
|
||||||
if (*(flow + 1) == '\t')
|
if (*(flow + 1) == '\t')
|
||||||
color_chars++;
|
color_chars++;
|
||||||
|
else if (*(flow + 1) == '[')
|
||||||
|
color_chars += 7;
|
||||||
else
|
else
|
||||||
color_chars += 2;
|
color_chars += 2;
|
||||||
flow++;
|
flow++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue