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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user