:terminal Enter/Leave should not increment jumplist

The old behavior is probably not justified, for the usual reason:
terminal buffers may have interactive processes, so cursor placement is
arbitrary, therefore tracking it in the jumplist is useless (or worse).

N.B.: per the docstring for `checkpcmark()` it looks like we were
calling `checkpcmark()` and `setpcmark()` in the wrong order.

closes #3723
This commit is contained in:
Justin M. Keyes
2018-02-05 23:38:30 +01:00
parent 2a4c9c6e45
commit d73dd1588c
2 changed files with 41 additions and 12 deletions

View File

@@ -61,7 +61,6 @@
#include "nvim/edit.h"
#include "nvim/mouse.h"
#include "nvim/memline.h"
#include "nvim/mark.h"
#include "nvim/map.h"
#include "nvim/misc1.h"
#include "nvim/move.h"
@@ -376,8 +375,6 @@ void terminal_enter(void)
// Ensure the terminal is properly sized.
terminal_resize(s->term, 0, 0);
checkpcmark();
setpcmark();
int save_state = State;
s->save_rd = RedrawingDisabled;
State = TERM_FOCUS;