Fix #31007: text editor delete at end of last line did unnecessary undo push.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 19 Apr 2012 09:27:11 +0000 (09:27 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 19 Apr 2012 09:27:11 +0000 (09:27 +0000)
Patch by Justin Dailey, simplified a bit.

source/blender/blenkernel/intern/text.c

index 4ce159b8aaf4ac721dbb2336cda2f78df939e845..a7e49dd7fc877fecdfd046f8c6b5ed7771737ecc 100644 (file)
@@ -2560,6 +2560,8 @@ void txt_delete_char(Text *text)
                        txt_combine_lines(text, text->curl, text->curl->next);
                        txt_pop_sel(text);
                }
+               else
+                       return;
        }
        else { /* Just deleting a char */
                size_t c_len = 0;