w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 06c890d7a840077a1bf88b82d8c806dfd635b29e
parent 6f7d7bbc8a9eda0cae1169d5f5c0cdd67112cdd6
Author: ukai <ukai>
Date:   Thu, 21 Nov 2002 17:11:15 +0000

[w3m-dev 03457] open URL of command line on each new tabs
* main.c (delBuffer): static
	(fusage): -N
	(main): add open_new_tab for -N
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 7+++++++
Mmain.c | 13+++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,5 +1,12 @@ 2002-11-22 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03457] open URL of command line on each new tabs + * main.c (delBuffer): static + (fusage): -N + (main): add open_new_tab for -N + +2002-11-22 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03456] tiling of tab * display.c (displayBuffer): use LastTab->y (redrawNLine): fix column calculation diff --git a/main.c b/main.c @@ -77,6 +77,7 @@ int (*searchRoutine) (Buffer *, char *); JMP_BUF IntReturn; +static void delBuffer(Buffer *buf); static void cmd_loadfile(char *path); static void cmd_loadURL(char *url, ParsedURL *current, char *referer); static void cmd_loadBuffer(Buffer *buf, int prop, int linkid); @@ -206,6 +207,7 @@ fusage(FILE * f, int err) #ifdef USE_COLOR fprintf(f, " -M monochrome display\n"); #endif /* USE_COLOR */ + fprintf(f, " -N open URL of command line on each new tab\n"); fprintf(f, " -F automatically render frame\n"); fprintf(f, " -cols width specify column width (used with -dump)\n"); @@ -367,6 +369,7 @@ main(int argc, char **argv, char **envp) int load_argc = 0; int load_bookmark = FALSE; int visual_start = FALSE; + int open_new_tab = FALSE; char search_header = FALSE; char *default_type = NULL; char *post_file = NULL; @@ -527,6 +530,8 @@ main(int argc, char **argv, char **envp) SearchHeader = search_header = TRUE; else if (!strcmp("-v", argv[i])) visual_start = TRUE; + else if (!strcmp("-N", argv[i])) + open_new_tab = TRUE; #ifdef USE_COLOR else if (!strcmp("-M", argv[i])) useColor = FALSE; @@ -899,6 +904,11 @@ main(int argc, char **argv, char **envp) calcTabPos(); Firstbuf = Currentbuf = newbuf; } + else if (open_new_tab) { + _newT(); + Currentbuf->nextBuffer = newbuf; + delBuffer(Currentbuf); + } else { Currentbuf->nextBuffer = newbuf; Currentbuf = newbuf; @@ -934,6 +944,7 @@ main(int argc, char **argv, char **envp) if (add_download_list) { add_download_list = FALSE; + CurrentTab = LastTab; if (!FirstTab) { FirstTab = LastTab = CurrentTab = newTab(); nTab = 1; @@ -948,6 +959,8 @@ main(int argc, char **argv, char **envp) Currentbuf = Firstbuf; ldDL(); } + else + CurrentTab = FirstTab; if (!FirstTab || !Firstbuf || Firstbuf == NO_BUFFER) { if (newbuf == NO_BUFFER) { if (fmInitialized)