From 9423a5c753ce961d7cd83594afbf50d21e89b49b Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Tue, 27 Mar 2018 09:29:31 -0400 Subject: [PATCH] removed unnecessary keyboard shortcut --- inc/edit.h | 1 - lib/view.c | 11 ----------- tide.c | 6 ------ 3 files changed, 18 deletions(-) diff --git a/inc/edit.h b/inc/edit.h index 8f355e4..c16b6e8 100644 --- a/inc/edit.h +++ b/inc/edit.h @@ -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); diff --git a/lib/view.c b/lib/view.c index 7449a58..b099051 100644 --- a/lib/view.c +++ b/lib/view.c @@ -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 85e72f8..14a7f5f 100644 --- 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) { -- 2.54.0