Skip to content

Commit

Permalink
visualstar starts a new search
Browse files Browse the repository at this point in the history
Fixes #254
  • Loading branch information
nosami committed Apr 28, 2019
1 parent 1825d43 commit 2c0d092
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions XSVim.Tests/MiscTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ module ``Miscellaneous tests`` =
let ``* finds next word at caret``() =
assertText "a$bc abc" "*" "abc a$bc"

[<Test>]
let ``n finds next match``() =
assertText "a$bc abc cba abc" "*n" "abc abc cba a$bc"

[<Test>]
let ``* finds next word when on last word char``() =
assertText "abc$ abc" "*" "abc a$bc"
Expand Down
2 changes: 1 addition & 1 deletion XSVim/Properties/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open System.Runtime.CompilerServices
[<AutoOpen>]
module AddinVersion =
[<Literal>]
let version = "0.65.1.80"
let version = "0.65.2"

[<assembly: AssemblyTitle("XSVim")>]
// The assembly version has the format {Major}.{Minor}.{Build}.{VSMacVersion}
Expand Down
4 changes: 2 additions & 2 deletions XSVim/XSVim.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand All @@ -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
Expand Down

0 comments on commit 2c0d092

Please sign in to comment.