mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-21 21:40:49 +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 && strchr("\n\r\f\t\v ", *flow)) {
|
||||
while (*flow && strchr("\n\r\f\v ", *flow)) {
|
||||
if (*flow == '\n' && !pass_line)
|
||||
if (i++ >= high) {
|
||||
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 + 1) == '\t')
|
||||
color_chars++;
|
||||
else if (*(flow + 1) == '[')
|
||||
color_chars += 7;
|
||||
else
|
||||
color_chars += 2;
|
||||
flow++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue