Skip to content

Commit 2c0d092

Browse files
committed
visualstar starts a new search
Fixes #254
1 parent 1825d43 commit 2c0d092

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

XSVim.Tests/MiscTests.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ module ``Miscellaneous tests`` =
173173
let ``* finds next word at caret``() =
174174
assertText "a$bc abc" "*" "abc a$bc"
175175

176+
[<Test>]
177+
let ``n finds next match``() =
178+
assertText "a$bc abc cba abc" "*n" "abc abc cba a$bc"
179+
176180
[<Test>]
177181
let ``* finds next word when on last word char``() =
178182
assertText "abc$ abc" "*" "abc a$bc"

XSVim/Properties/AssemblyInfo.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ open System.Runtime.CompilerServices
55
[<AutoOpen>]
66
module AddinVersion =
77
[<Literal>]
8-
let version = "0.65.1.80"
8+
let version = "0.65.2"
99

1010
[<assembly: AssemblyTitle("XSVim")>]
1111
// The assembly version has the format {Major}.{Minor}.{Build}.{VSMacVersion}

XSVim/XSVim.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ module Vim =
11741174
let m = matches |> Seq.head
11751175
m.Index
11761176
editor.CaretOffset <- offset
1177-
vimState
1177+
{ vimState with lastSearch = Some (Jump (ToSearch word)) }
11781178
| None ->
11791179
processCommands config 1 vimState (runOnce Move WordForwards) isInitial
11801180
| Star Before ->
@@ -1196,7 +1196,7 @@ module Vim =
11961196
let m = matches |> Seq.last
11971197
m.Index
11981198
editor.CaretOffset <- offset
1199-
vimState
1199+
{ vimState with lastSearch = Some (Jump (ToSearchBackwards word)) }
12001200
| None -> vimState
12011201
| InsertChar c ->
12021202
match vimState.mode with

0 commit comments

Comments
 (0)