From 2c0d092e7c4262742da1b1d70ef5262998ea4524 Mon Sep 17 00:00:00 2001 From: nosami Date: Sun, 28 Apr 2019 21:14:03 +0100 Subject: [PATCH] visualstar starts a new search Fixes #254 --- XSVim.Tests/MiscTests.fs | 4 ++++ XSVim/Properties/AssemblyInfo.fs | 2 +- XSVim/XSVim.fs | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/XSVim.Tests/MiscTests.fs b/XSVim.Tests/MiscTests.fs index fd77838..f41d9a6 100644 --- a/XSVim.Tests/MiscTests.fs +++ b/XSVim.Tests/MiscTests.fs @@ -173,6 +173,10 @@ module ``Miscellaneous tests`` = let ``* finds next word at caret``() = assertText "a$bc abc" "*" "abc a$bc" + [] + let ``n finds next match``() = + assertText "a$bc abc cba abc" "*n" "abc abc cba a$bc" + [] let ``* finds next word when on last word char``() = assertText "abc$ abc" "*" "abc a$bc" diff --git a/XSVim/Properties/AssemblyInfo.fs b/XSVim/Properties/AssemblyInfo.fs index 877fae7..38c8d2d 100644 --- a/XSVim/Properties/AssemblyInfo.fs +++ b/XSVim/Properties/AssemblyInfo.fs @@ -5,7 +5,7 @@ open System.Runtime.CompilerServices [] module AddinVersion = [] - let version = "0.65.1.80" + let version = "0.65.2" [] // The assembly version has the format {Major}.{Minor}.{Build}.{VSMacVersion} diff --git a/XSVim/XSVim.fs b/XSVim/XSVim.fs index 5abc21a..13dc7e1 100755 --- a/XSVim/XSVim.fs +++ b/XSVim/XSVim.fs @@ -1174,7 +1174,7 @@ module Vim = let m = matches |> Seq.head m.Index editor.CaretOffset <- offset - vimState + { vimState with lastSearch = Some (Jump (ToSearch word)) } | None -> processCommands config 1 vimState (runOnce Move WordForwards) isInitial | Star Before -> @@ -1196,7 +1196,7 @@ module Vim = let m = matches |> Seq.last m.Index editor.CaretOffset <- offset - vimState + { vimState with lastSearch = Some (Jump (ToSearchBackwards word)) } | None -> vimState | InsertChar c -> match vimState.mode with