anchor.diff: -module Koffee.MainLogic
  +﻿module Koffee.MainLogic
   
   open System.Text.RegularExpressions
   open System.Threading.Tasks
  
positive.code: let refreshOrResearch fsReader subDirResults progress model = asyncSeqResult {
      match model.CurrentSearch with
      | Some currentSearch ->
          let! newModel = model |> Nav.openPath fsReader model.Location (SelectName model.SelectedItem.Name)
          let input, case, regex, sub = currentSearch
          yield!
              { newModel with
                  InputText = input
                  SearchCaseSensitive = case
  
negative.code:             }
              |> Search.search fsReader subDirResults progress
              |> AsyncSeq.map Ok
              |> AsyncSeq.cache
          yield! searchModels
          // when done searching, re-sort
          match! searchModels |> AsyncSeq.tryLast with
          | Some (Ok newModel) ->
              let items = newModel.Items |> (newModel.Sort |> Option.map SortField.SortByTypeThen |? id)
              yield!
                  { newModel with Items = items }
                  |> Nav.select selectType
                  |> Ok
          | Some error -> yield! error
          | None -> ()
      | None ->
          yield! Nav.refresh fsReader model
  }
  