Undo Fix: Down arrow on last line sent cursor to end (right) but undo sent it up...
authorIan Thompson <quornian@googlemail.com>
Sat, 26 Jul 2008 22:37:05 +0000 (22:37 +0000)
committerIan Thompson <quornian@googlemail.com>
Sat, 26 Jul 2008 22:37:05 +0000 (22:37 +0000)
source/blender/blenkernel/intern/text.c

index 4291150f443e93d12ac0acec0ade58c780c05635..d2100535ecc67be690faf5dce1d0b34fcc9de118 100644 (file)
@@ -628,8 +628,7 @@ void txt_move_up(Text *text, short sel)
                        if(!undoing) txt_undo_add_op(text, sel?UNDO_SUP:UNDO_CUP);
                }
        } else {
-               *charp= 0;
-               if(!undoing) txt_undo_add_op(text, sel?UNDO_SUP:UNDO_CUP);
+               txt_move_bol(text, sel);
        }
 
        if(!sel) txt_pop_sel(text);
@@ -654,8 +653,7 @@ void txt_move_down(Text *text, short sel)
                } else
                        if(!undoing) txt_undo_add_op(text, sel?UNDO_SDOWN:UNDO_CDOWN);  
        } else {
-               *charp= (*linep)->len;
-               if(!undoing) txt_undo_add_op(text, sel?UNDO_SDOWN:UNDO_CDOWN);
+               txt_move_eol(text, sel);
        }
 
        if(!sel) txt_pop_sel(text);