From: Michael D. Lowis Date: Wed, 9 Jan 2019 18:26:23 +0000 (-0500) Subject: fixed bug where fetch tries to interpret argument as flags if it starts with a - X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7098f8543850323a6dc311f909bd5c375c096727;p=projs%2Ftide.git fixed bug where fetch tries to interpret argument as flags if it starts with a - --- diff --git a/config.h b/config.h index 08ed519..a25f273 100644 --- 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 "; diff --git a/src/tide.c b/src/tide.c index 625a2f6..626a0f6 100644 --- a/src/tide.c +++ b/src/tide.c @@ -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]); } }