diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-07 20:43:37 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-08 12:49:59 +0200 |
| commit | 90e798d9e3e1999e6aa51625ea222cb0c8abf834 (patch) | |
| tree | 7a5f46cc7db457996179618d366d9104fa96817f /vis-cmds.c | |
| parent | df84a1c16844c0eaebe12dd0e606d5b2c478c478 (diff) | |
| download | vis-90e798d9e3e1999e6aa51625ea222cb0c8abf834.tar.gz vis-90e798d9e3e1999e6aa51625ea222cb0c8abf834.tar.xz | |
vis: let :e recreate a window at the same location as the old one
Close #224
Diffstat (limited to 'vis-cmds.c')
| -rw-r--r-- | vis-cmds.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -319,8 +319,12 @@ static bool cmd_edit(Vis *vis, Win *win, Command *cmd, const char *argv[], Curso return vis_window_reload(oldwin); if (!openfiles(vis, &argv[1])) return false; - if (vis->win != oldwin) + if (vis->win != oldwin) { + Win *newwin = vis->win; + vis_window_swap(oldwin, newwin); vis_window_close(oldwin); + vis_window_focus(newwin); + } return vis->win != oldwin; } |
