   }
 
   public func setScrollRegionToTop(_ top: Int32, bottom: Int32, left: Int32, right: Int32) {
-    DispatchUtils.gui {
       let region = Region(top: Int(top), bottom: Int(bottom), left: Int(left), right: Int(right))
       self.grid.setScrollRegion(region)
       self.markForRender(region: region)
-    }
   }
 
   public func scroll(_ count: Int32) {
-    DispatchUtils.gui {
       self.grid.scroll(Int(count))
       self.markForRender(region: self.grid.region)
       // Do not send msgs to agent -> neovim in the delegate method. It causes spinning when you're opening a file with
       // existing swap file.
+    DispatchUtils.gui {
       self.delegate?.scroll()
     }
   }
 
   public func highlightSet(_ attrs: CellAttributes) {
-    DispatchUtils.gui {
       self.grid.attrs = attrs
-    }
   }
 
   public func put(_ string: String, screenCursor: Position) {
-    DispatchUtils.gui {
       let curPos = self.grid.putPosition
 //      NSLog("\(#function): \(curPos) -> \(string)")
       self.grid.put(string)

      return
    }

    DispatchUtils.gui {
      self.rectsMarkedForRender.forEach(self.setNeedsDisplay)
      self.rectsMarkedForRender.removeAll()
    }
  }

  public func updateForeground(_ fg: Int32) {
    DispatchUtils.gui {
      self.grid.foreground = UInt32(bitPattern: fg)
//      NSLog("\(ColorUtils.colorIgnoringAlpha(UInt32(fg)))")
    }
  }

  public func updateBackground(_ bg: Int32) {
    DispatchUtils.gui {
      self.grid.background = UInt32(bitPattern: bg)
      self.layer?.backgroundColor = ColorUtils.colorIgnoringAlpha(self.grid.background).cgColor
//      NSLog("\(ColorUtils.colorIgnoringAlpha(UInt32(bg)))")
    }
  }

  public func updateSpecial(_ sp: Int32) {
    NSLog("\(Thread.current)")
    DispatchUtils.gui {
      self.grid.special = UInt32(bitPattern: sp)
    }
  }

  public func suspend() {


      self.grid.goto(position)
      self.grid.moveCursor(screenCursor)

    DispatchUtils.gui {
      self.delegate?.cursor(to: currentPosition)
    }
