]> git.mdlowis.com Git - projs/tide.git/commitdiff
removed implicit mark
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 2 Apr 2018 13:05:53 +0000 (09:05 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 2 Apr 2018 13:05:53 +0000 (09:05 -0400)
inc/edit.h
lib/view.c
tide.c

index 8f173a73b1254c387fd91afc1cf6a4b606740e2e..75632e9f8671d1a6e18414286246f4a403ff6933 100644 (file)
@@ -105,7 +105,6 @@ typedef struct {
 typedef struct {
     Buf buffer;         /* the buffer used to populate the view */
     Sel selection;      /* range of currently selected text */
-    size_t prev_csr;    /* previous cursor location */
     size_t nrows;       /* number of rows in the view */
     size_t ncols;       /* number of columns in the view */
     Row** rows;         /* array of row data structures */
@@ -157,7 +156,6 @@ void view_selextend(View* view, size_t row, size_t col);
 void view_selword(View* view, size_t row, size_t col);
 void view_select(View* view, size_t row, size_t col);
 void view_jumpto(View* view, bool extsel, size_t off);
-void view_jumpback(View* view);
 void view_scrollto(View* view, size_t csr);
 Rune view_getrune(View* view);
 
index e37dab3008a95c9d51eb4c44047ff6adb310ca61..f8127cdb0cdedb311ec46c2d4d2d1ae2105a946e 100644 (file)
@@ -33,7 +33,6 @@ void view_init(View* view, char* file) {
     view->selection   = (Sel){ 0 };
     view->sync_needed = true;
     view->sync_center = true;
-    view->prev_csr    = 0;
     /* load the file and jump to the address returned from the load function */
     buf_init(&(view->buffer));
     if (file) {
@@ -180,7 +179,6 @@ bool view_findstr(View* view, int dir, char* str) {
     view->selection   = sel;
     view->sync_needed = true;
     view->sync_center = true;
-    if (found) view->prev_csr = prev;
     return found;
 }
 
@@ -208,15 +206,9 @@ void view_delete(View* view, int dir, bool byword) {
 }
 
 void view_jumpto(View* view, bool extsel, size_t off) {
-    view->prev_csr = view->selection.end;
     move_to(view, extsel, off);
 }
 
-void view_jumpback(View* view) {
-    view_jumpto(view, false, view->prev_csr);
-    view->sync_center = true;
-}
-
 void view_bol(View* view, bool extsel) {
     /* determine whether we are jumping to start of content or line */
     Buf* buf = &(view->buffer);
@@ -247,14 +239,12 @@ void view_setln(View* view, size_t line) {
 }
 
 void view_undo(View* view) {
-    view->prev_csr = view->selection.end;
     buf_undo(&(view->buffer), &(view->selection));
     view->sync_needed = true;
     view->sync_center = !selection_visible(view);
 }
 
 void view_redo(View* view) {
-    view->prev_csr = view->selection.end;
     buf_redo(&(view->buffer), &(view->selection));
     view->sync_needed = true;
     view->sync_center = !selection_visible(view);
diff --git a/tide.c b/tide.c
index a66f7a7b0db79a6849caaf956a130fa3ea1b3c60..376f0aeefbdad77f69636b997c19a130e0902eef 100644 (file)
--- a/tide.c
+++ b/tide.c
@@ -387,13 +387,9 @@ static void jump_to(char* arg) {
 }
 
 static void goto_ctag(char* arg) {
-    if (x11_keymodsset(ModShift)) {
-        view_jumpback(win_view(FOCUSED));
-    } else {
-        char* str = view_getctx(win_view(FOCUSED));
-        jump_to(str);
-        free(str);
-    }
+    char* str = view_getctx(win_view(FOCUSED));
+    jump_to(str);
+    free(str);
 }
 
 static void tabs(char* arg) {