OSDN Git Service

行末より右にカーソルがある時にBACKSPACEキーを押すとDELETEキーの動作を
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 3 Nov 2003 08:48:55 +0000 (08:48 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 3 Nov 2003 08:48:55 +0000 (08:48 +0000)
してしまうバグ修正。BACKSPACEキーの動作に、一部DELETEキー用のコードが混っていた。

src/autopick.c

index a879c3b..74ee0ee 100644 (file)
@@ -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)
                {