]> git.mdlowis.com Git - projs/tide.git/commitdiff
Added option to override tag region contents with EDITTAGS env var
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 17 Jan 2017 15:29:58 +0000 (10:29 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 17 Jan 2017 15:29:58 +0000 (10:29 -0500)
TODO.md
xedit.c

diff --git a/TODO.md b/TODO.md
index 29dc2ffc241ab8e03840cef922daaaa859db6165..a42e607c0f2f1398163562d31ba10716f2355635 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -2,8 +2,8 @@
 
 Up Next:
 
-* Right click in tags region should search edit region
 * Implement X Selection protocol for handling clipboard and primary selections
+* Right click in tags region should search edit region
 * 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
diff --git a/xedit.c b/xedit.c
index 7e2e79483858b355669c0cc2d182ec28035381b6..ba59599205f68b37b5cf8d958f6c9b0696944c73 100644 (file)
--- a/xedit.c
+++ b/xedit.c
@@ -197,8 +197,9 @@ static char* SedCmd[] = { "sed", "-e", NULL, NULL };
 #ifndef TEST
 int main(int argc, char** argv) {
     /* load the buffer views */
+    char* tags = getenv("EDITTAGS");
     view_init(getview(TAGS), NULL);
-    view_putstr(getview(TAGS), DEFAULT_TAGS);
+    view_putstr(getview(TAGS), (tags ? tags : DEFAULT_TAGS));
     view_selprev(getview(TAGS)); // clear the selection
     buf_logclear(getbuf(TAGS));
     view_init(getview(EDIT), (argc > 1 ? argv[1] : NULL));