diff options
| author | Quentin Carbonneaux | 2014-08-26 17:02:49 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-08-26 17:02:49 -0400 |
| commit | 2e3f55654853bdc6c9a48a9e3670461ebbb7237c (patch) | |
| tree | 6292813ccc80bf083867730a4256939f98d243ea | |
| parent | 12ac8baeecda34d67b343cd5880ccd4c01ddb36d (diff) | |
change behavior of New
| -rw-r--r-- | exec.c | 22 | ||||
| -rw-r--r-- | win.h | 1 |
2 files changed, 13 insertions, 10 deletions
@@ -43,16 +43,6 @@ static ECmd etab[] = { { 0, run }, }; -static int -new(W *w, EBuf *eb, unsigned pos) -{ - extern W *curwin; - - (void)w; (void)eb; (void)pos; - curwin = win_new(eb_new()); - return 1; -} - /* ex_run - Execute a command in the current window at * position [p0]. The command is first searched among * the list of builtins, if not found, it is run in a shell. @@ -327,6 +317,18 @@ look(W *w, EBuf *eb, unsigned p0) return 1; } +static int +new(W *w, EBuf *eb, unsigned pos) +{ + extern W *curwin; + + (void)eb; (void)pos; + w = win_new(eb_new()); + if (w) + curwin = win_tag_toggle(w); + return 0; +} + typedef struct run Run; struct run { EBuf *eb; /* 0 if no more to read */ @@ -11,6 +11,7 @@ typedef struct w W; #define TagInit \ "Look \n" \ "Get \n" \ + "New\n" \ "|fmt\n" enum { |
