]> git.mdlowis.com Git - projs/tide.git/commitdiff
removed unnecessary keyboard shortcut
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 27 Mar 2018 13:29:31 +0000 (09:29 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 27 Mar 2018 13:29:31 +0000 (09:29 -0400)
inc/edit.h
lib/view.c
tide.c

index 8f355e402a55952605ec003600ce91103310d5db..c16b6e8e3d16e7c993ccb14412d3fb704c96569c 100644 (file)
@@ -148,7 +148,6 @@ char* view_getcmd(View* view);
 char* view_getctx(View* view);
 void view_selctx(View* view);
 void view_scroll(View* view, int move);
-void view_csrsummon(View* view);
 void view_scrollpage(View* view, int move);
 void view_setln(View* view, size_t line);
 void view_indent(View* view, int dir);
index 7449a58d20f1e244af4e2a5387ccf6c6f911da48..b0990514b788dcdb6985f462a4aeaee7ab754fe0 100644 (file)
@@ -336,20 +336,9 @@ void view_scroll(View* view, int move) {
     }
 }
 
-void view_csrsummon(View* view) {
-    Row* midrow = view->rows[view->nrows/2];
-    size_t col = SIZE_MAX, row = SIZE_MAX, off = midrow->off;
-    find_cursor(view, &col, &row);
-    if (row != SIZE_MAX && col != SIZE_MAX)
-        off += (col >= midrow->rlen ? (midrow->rlen - 1) : col);
-    view_jumpto(view, false, off);
-    view->sync_needed = false;
-}
-
 void view_scrollpage(View* view, int move) {
     move = (move < 0 ? -1 : 1) * view->nrows;
     view_scroll(view, move);
-    view_csrsummon(view);
 }
 
 void view_indent(View* view, int dir) {
diff --git a/tide.c b/tide.c
index 85e72f8711003e12363638d5c5c2f57bcaa70c5a..14a7f5f23e435e885d77043884ff32cc7976f243 100644 (file)
--- a/tide.c
+++ b/tide.c
@@ -191,10 +191,6 @@ static void cursor_right(char* arg) {
         view_byrune(win_view(FOCUSED), RIGHT, extsel);
 }
 
-static void cursor_warp(char* arg) {
-    view_csrsummon(win_view(FOCUSED));
-}
-
 static void page_up(char* arg) {
     view_scrollpage(win_view(FOCUSED), UP);
 }
@@ -539,7 +535,6 @@ static KeyBinding Bindings[] = {
     { ModAny,  KEY_DOWN,  cursor_dn    },
     { ModAny,  KEY_LEFT,  cursor_left  },
     { ModAny,  KEY_RIGHT, cursor_right },
-    { ModCtrl, ';',       cursor_warp  },
 
     /* Standard Unix Shortcuts */
     { ModCtrl, 'u', del_to_bol  },
@@ -613,7 +608,6 @@ void onlayout(void) {
 
 void onshutdown(void) {
     quit(0);
-    exit(0);
 }
 
 static void oninput(Rune rune) {