]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed bug where fetch tries to interpret argument as flags if it starts with a -
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 9 Jan 2019 18:26:23 +0000 (13:26 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 9 Jan 2019 18:26:23 +0000 (13:26 -0500)
config.h
src/tide.c

index 08ed519bb45be10a1b0ad56115fc6a66895a30b0..a25f2733a61480e9818530346fcf591bfa5f8e85 100644 (file)
--- a/config.h
+++ b/config.h
@@ -28,7 +28,7 @@ static char* ShellCmd[] = { 0, "-c", 0, 0 };
 static char* SedCmd[] = { "sed", "-Ee", 0, 0 };
 
 /* Command used to fetch some text based on a set of rules */
-static char* FetchCmd[] = { "fetch", 0, 0 };
+static char* FetchCmd[] = { "fetch", "--", 0, 0 };
 
 /* Default tag region text in editor windows */
 static char* TagString = "Del Put Undo Redo | Font Tabs Eol | Find ";
index 625a2f6bd51b7b1c0f4efa43742f6a34f99454b9..626a0f6a7f70fab41f05e4b73b897d618db54b30 100644 (file)
@@ -152,7 +152,7 @@ static void mouse_right(WinRegion id, bool pressed, size_t row, size_t col) {
     if (PRESSED(MouseLeft)) {
         paste(NULL);
     } else {
-        FetchCmd[1] = view_fetch(win_view(id), row, col, risfile);
+        FetchCmd[2] = view_fetch(win_view(id), row, col, risfile);
         if (job_run(FetchCmd) != 0) {
             SearchDir *= (win_keymodsset(ModShift) ? -1 : +1);
             free(SearchTerm);
@@ -160,7 +160,7 @@ static void mouse_right(WinRegion id, bool pressed, size_t row, size_t col) {
             view_findstr(win_view(EDIT), SearchDir, SearchTerm);
             SyncMouse = true;
         }
-        free(FetchCmd[1]);
+        free(FetchCmd[2]);
     }
 }