Fix: Text editor, blank lines were being indented

Summary: fixes T37613

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Maniphest Tasks: T37613

Differential Revision: http://developer.blender.org/D42
This commit is contained in:
Dalai Felinto
2013-11-26 04:38:53 -02:00
parent d4284056c7
commit a03aec3178

View File

@@ -2650,6 +2650,9 @@ void txt_indent(Text *text)
num = 0;
while (TRUE) {
/* don't indent blank lines */
if (text->curl->len != 0) {
tmp = MEM_mallocN(text->curl->len + indentlen + 1, "textline_string");
text->curc = 0;
@@ -2666,6 +2669,7 @@ void txt_indent(Text *text)
txt_make_dirty(text);
txt_clean_text(text);
}
if (text->curl == text->sell) {
text->selc += indentlen;