anchor.diff:  open System.Text.RegularExpressions
   open System.Threading.Tasks
   open Utility
  -open ModelExtensions
   open Koffee.ConfigExt
   
   module MainLogic =
  
positive.code:     module Cursor =
          let private moveCursorToNext predicate reverse (model: MainModel) =
              let indexed = model.Nodes |> List.mapi (fun i n -> (i, n))
              let items =
                  if reverse then
                      Seq.append indexed.[model.Cursor..] indexed.[0..(model.Cursor-1)]
                      |> Seq.rev
                  else
                      Seq.append indexed.[(model.Cursor+1)..] indexed.[0..model.Cursor]
              items
              |> Seq.choose (fun (i, n) -> if predicate n then Some i else None)
              |> Seq.tryHead
              |> Option.iter (fun index -> model.SetCursor index)
  
          let find char (model: MainModel) =
              model.LastFind <- Some char
  
negative.code:             if inputMode.AllowedOnNodeType model.SelectedNode.Type then
                  let text, pos =
                      match inputMode with
                      | Rename pos -> model.SelectedNode.Name, (Some pos)
                      | _ -> "", None
                  model.CommandInputMode <- Some inputMode
                  model.CommandText <- text
                  setCommandSelection pos model
  