Undo Fix: Down arrow on last line sent cursor to end (right) but undo sent it up. Similar for up arrow on first line. Undo was then off by a line.

This commit is contained in:
Ian Thompson 2008-07-26 22:37:05 +00:00
parent 6872ff71d5
commit 01a6d44b07
1 changed files with 2 additions and 4 deletions

View 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);