~sircmpwn/visurf-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] open: add -F flag

Details
Message ID
<20211118110825.23851-1-pranjal.kole7@gmail.com>
DKIM signature
pass
Download raw message
Patch: +13 -3
---
 frontends/visurf/commands.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/frontends/visurf/commands.c b/frontends/visurf/commands.c
index 6afb6c4f3..6bccaad5d 100644
--- a/frontends/visurf/commands.c
+++ b/frontends/visurf/commands.c
@@ -399,11 +399,11 @@ cmd_insert(struct nsvi_state *state, int argc, char *argv[])
static int
cmd_open(struct nsvi_state *state, int argc, char *argv[])
{
	bool background = false, tab = false, window = false;
	bool background = false, tab = false, window = false, filter_url = true;

	int c;
	ns_optind = 0;
	while ((c = ns_getopt(argc, argv, "btw")) != -1) {
	while ((c = ns_getopt(argc, argv, "btwF")) != -1) {
		switch (c) {
		case 'b':
			background = true;
@@ -414,6 +414,9 @@ cmd_open(struct nsvi_state *state, int argc, char *argv[])
		case 'w':
			window = true;
			break;
		case 'F':
			filter_url = false;
			break;
		default:
			NSLOG(netsurf, ERROR, "reload: invalid flag '%c'", c);
			return 1;
@@ -431,7 +434,14 @@ cmd_open(struct nsvi_state *state, int argc, char *argv[])

	int ret = 0;
	nsurl *url = NULL;
	nserror error = nsvi_filter_url(&global_state->filter, target, &url);
	nserror error;

	if (filter_url) {
		error = nsvi_filter_url(&global_state->filter, target, &url);
	} else {
		error = nsurl_create(target, &url);
	}

	if (error != NSERROR_OK) {
		NSLOG(netsurf, ERROR, "open: invalid url");
		ret = 1;
-- 
2.34.0
Details
Message ID
<CFTLINSWY2J4.12ZI3G0JD2D7Y@taiga>
In-Reply-To
<20211118110825.23851-1-pranjal.kole7@gmail.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Thanks!

To git@git.sr.ht:~sircmpwn/visurf
   cfc682444..9721516ab  master -> master
Reply to thread Export thread (mbox)