Prechádzať zdrojové kódy

Merge pull request #2520 from bojidar-bg/patch-3

Add missing \n to world_wrap.
Juan Linietsky 10 rokov pred
rodič
commit
1028ab9d81
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      core/ustring.cpp

+ 1 - 1
core/ustring.cpp

@@ -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;
 		}