mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Add missing \n to world_wrap. Close #2516
The issue was that world_wrap would skip over newlines, without adding them to the output.
This commit is contained in:
@@ -3066,7 +3066,7 @@ String String::world_wrap(int p_chars_per_line) const {
|
||||
} else if (operator[](i)==' ' || operator[](i)=='\t') {
|
||||
last_space=i;
|
||||
} else if (operator[](i)=='\n') {
|
||||
ret+=substr(from,i-from);
|
||||
ret+=substr(from,i-from)+"\n";
|
||||
from=i+1;
|
||||
last_space=-1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user