diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-21 12:34:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-21 12:34:02 +0400 |
commit | 177ea51fab2bbbc24a6089a294028694e4344e8e (patch) | |
tree | f8dd1af218b6d3904ef57c6d00adaa48fb4ae4e6 /source/blender/blenkernel/intern | |
parent | e9cf211c9bf1162789a757a5ad5d22d40058d2c0 (diff) |
fix for unintended fall-through in switch statement, also reduce undo_pos increments in text editor.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index c545943f15c..f1b4626ec73 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2016,10 +2016,7 @@ void txt_do_undo(Text *text) buf[i] = 0; /* skip over the length that was stored again */ - text->undo_pos--; - text->undo_pos--; - text->undo_pos--; - text->undo_pos--; + text->undo_pos -= 4; /* Get the cursor positions */ txt_undo_read_cursors(text->undo_buf, &text->undo_pos, &curln, &curc, &selln, &selc); @@ -2053,10 +2050,7 @@ void txt_do_undo(Text *text) MEM_freeN(buf); /* skip over the length that was stored again */ - text->undo_pos--; - text->undo_pos--; - text->undo_pos--; - text->undo_pos--; + text->undo_pos -= 4; /* get and restore the cursors */ txt_undo_read_cursors(text->undo_buf, &text->undo_pos, &curln, &curc, &selln, &selc); @@ -2207,10 +2201,7 @@ void txt_do_redo(Text *text) text->undo_pos += linep; /* skip over the length that was stored again */ - text->undo_pos++; - text->undo_pos++; - text->undo_pos++; - text->undo_pos++; + text->undo_pos += 4; txt_delete_sel(text); @@ -2236,10 +2227,7 @@ void txt_do_redo(Text *text) MEM_freeN(buf); /* skip over the length that was stored again */ - text->undo_pos++; - text->undo_pos++; - text->undo_pos++; - text->undo_pos++; + text->undo_pos += 4; break; |