From: mogami Date: Mon, 3 Nov 2003 08:48:55 +0000 (+0000) Subject: 行末より右にカーソルがある時にBACKSPACEキーを押すとDELETEキーの動作を X-Git-Tag: v2.1.2~916 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8fdb082f31a0c3ec9a189753073bf1282ff7945a;p=hengband%2Fhengband.git 行末より右にカーソルがある時にBACKSPACEキーを押すとDELETEキーの動作を してしまうバグ修正。BACKSPACEキーの動作に、一部DELETEキー用のコードが混っていた。 --- diff --git a/src/autopick.c b/src/autopick.c index a879c3bb8..74ee0ee64 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -5407,20 +5407,9 @@ static bool do_editor_command(text_body_type *tb, int com_id) tb->dirty_flags |= DIRTY_ALL; } + /* Move to correct collumn */ len = strlen(tb->lines_list[tb->cy]); - if (len < tb->cx) - { - if (tb->lines_list[tb->cy + 1]) - { - tb->cy++; - tb->cx = 0; - } - else - { - tb->cx = len; - break; - } - } + if (len < tb->cx) tb->cx = len; if (tb->cx == 0) {