]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed crappy implementation of chomp with slightly less crappy version of chomp
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 16 Jan 2017 15:15:25 +0000 (10:15 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 16 Jan 2017 15:15:25 +0000 (10:15 -0500)
TODO.md
lib/utils.c

diff --git a/TODO.md b/TODO.md
index 48338d6100115de66bb3b19d8c061d59564fb747..29dc2ffc241ab8e03840cef922daaaa859db6165 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -2,6 +2,7 @@
 
 Up Next:
 
+* Right click in tags region should search edit region
 * 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
@@ -9,9 +10,12 @@ Up Next:
 * invalid memory accesses while viewing docs/waf
 * check for file changes on save
 * check for file changes when window regains focus
+* Use $SHELL if defined, fallback on /bin/sh
+* Set ENV to ~/.config/edit/rc if undefined
 
 The Rest:
 
+* Selection bug when selecting text with tabs
 * add a distinct state for pointer move versus drag
 * Add a SaveAs tag that takes an argument for the filename to save as
 * Add a GoTo tag for ctags lookup and line number jump
@@ -22,6 +26,10 @@ The Rest:
 * 100% coverage with unit and unit-integration tests
 * shortcut to repeat previous operation
 
+The Future:
+
+* Run commands in the background and don't block the main thread.
+
 # Auxillary Programs
 
 * Acme-like window manager
index 78f9bed9e03df522a65a21fcfb7cb934a09701d9..f2b344465489bdacbcbab0a66128007f10f7a76a 100644 (file)
@@ -90,6 +90,8 @@ char* fdgets(int fd) {
 }
 
 char* chomp(char* in) {
-    return strtok(in, "\r\n");
+    char* pos = strrchr(in, '\n');
+    if (pos) *pos = '\0';
+    return in;
 }