From d7321e1f65f76ece1ec5759e11eb8636948ce756 Mon Sep 17 00:00:00 2001 From: xconverge Date: Mon, 17 Oct 2016 20:18:07 -0700 Subject: [PATCH] fixes #652 --- src/actions/actions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/actions/actions.ts b/src/actions/actions.ts index 30a3cbca0bd..75bf8d4e565 100644 --- a/src/actions/actions.ts +++ b/src/actions/actions.ts @@ -1208,7 +1208,6 @@ class CommandInsertInSearchMode extends BaseCommand { searchState.searchString = searchState.searchString.slice(0, -1); } else if (key === "\n") { vimState.currentMode = ModeName.Normal; - vimState.cursorPosition = searchState.getNextSearchMatchPosition(vimState.cursorPosition).pos; // Repeat the previous search if no new string is entered if (searchState.searchString === "") { @@ -1220,6 +1219,9 @@ class CommandInsertInSearchMode extends BaseCommand { // Store this search vimState.searchStatePrevious = searchState; + // Move cursor to next match + vimState.cursorPosition = searchState.getNextSearchMatchPosition(vimState.cursorPosition).pos; + return vimState; } else if (key === "") { vimState.currentMode = ModeName.Normal;