]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed segfault in Get tag command
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 18 Dec 2018 01:51:26 +0000 (20:51 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 18 Dec 2018 01:51:26 +0000 (20:51 -0500)
TODO.md
src/lib/view.c

diff --git a/TODO.md b/TODO.md
index 3183fedb42e94eeaf34449aed2972cc5f8d7a21b..7850db76adc04c6624150e0abf5092cc330d4ea5 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -2,6 +2,7 @@
 
 ## STAGING
 
+* Ctrl+D  should not pass tag name as arg when executing tag commands
 * registrar doesnt match open windows when new file created and is then opened for edit or line number
 * implement a mini-sed command to standardize scripts across platforms without relying on sed
 * registrar should remove invalid windows from registry when detected
index 0348c0a1b6c113c0a17ff1e8c93c9625eebc8e1f..e505621f8558693fbe7eb3e0f109788ccaac3b80 100644 (file)
@@ -161,7 +161,7 @@ static void resize(View* view, size_t width, size_t nrows, size_t off) {
 void view_resize(View* view, size_t width, size_t nrows) {
     if (view->width == width && view->nvisible == nrows)
         return;
-    size_t off = (view->rows ? view->rows[view->index]->off : 0);
+    size_t off = (view->nrows && view->index < view->nrows ? view->rows[view->index]->off : 0);
     resize(view, width, nrows, off);
 }