]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed open at line number functionality
authorMichael D. Lowis <mike.lowis@gentex.com>
Thu, 12 Jan 2017 14:30:02 +0000 (09:30 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Thu, 12 Jan 2017 14:30:02 +0000 (09:30 -0500)
TODO.md
lib/buf.c

diff --git a/TODO.md b/TODO.md
index ec644ada0d2d1fba7afc519d0b180a5b61c226ec..48338d6100115de66bb3b19d8c061d59564fb747 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -2,8 +2,8 @@
 
 Up Next:
 
-* Add keyboard shortcut to highlight the thing under the cursor
 * Implement X Selection protocol for handling clipboard and primary selections
+* Add keyboard shortcut to highlight the thing under the cursor
 * Tag line count should account for wrapped lines
 * ctrl+alt+f should find next occurence of previous search term
 * invalid memory accesses while viewing docs/waf
index ab033c1fd16ce2544ffa9209d37f3effbfe3cd45..b5fca4ffc78407f3a5569a6b178d86b6238b2758 100644 (file)
--- a/lib/buf.c
+++ b/lib/buf.c
@@ -216,6 +216,10 @@ unsigned buf_load(Buf* buf, char* path) {
         }
         buf_insert(buf, false, buf_end(buf), r);
     }
+    
+    /* jump to address if we got one */
+    if (addr)
+        off = buf_setln(buf, strtoul(addr, NULL, 0));
 
     /* reset buffer state */
     buf->modified = false;