   }
 
   #if DEBUG
-  func dump() throws {
-    let encoder = JSONEncoder()
-    encoder.outputFormatting = .prettyPrinted
-
-    let data = try encoder.encode(self)
-    try data.write(to: URL(fileURLWithPath: "/tmp/ugrid.dump.json"))
-  }
+    func dump() throws {
+      let encoder = JSONEncoder()
+      encoder.outputFormatting = .prettyPrinted
+
+      let data = try encoder.encode(self)
+      try data.write(to: URL(fileURLWithPath: "/tmp/ugrid.dump.json"))
+    }
   #endif
 
   var description: String {
     let result = "UGrid.flatCharIndex:\n" + self.cells.reduce("") { result, row in
-      return result + "(\(row[0].flatCharIndex...row[self.size.width - 1].flatCharIndex)), "
+      result + "(\(row[0].flatCharIndex...row[self.size.width - 1].flatCharIndex)), "
     }
 
     return result
   }
-  var hasData: Bool {
-    return !self.cells.isEmpty
-  }
+
+  var hasData: Bool { !self.cells.isEmpty }
 
   func unmarkCell(at position: Position) {
     let attrId = self.cells[position.row][position.column].attrId
 
     guard attrId < CellAttributesCollection.defaultAttributesId
-          || attrId == CellAttributesCollection.reversedDefaultAttributesId
-      else {
-      return
-    }
+      || attrId == CellAttributesCollection.reversedDefaultAttributesId
+    else { return }
 
     let newAttrsId: Int
     if attrId == CellAttributesCollection.reversedDefaultAttributesId {

}

final class UGrid: CustomStringConvertible, Codable {

  private(set) var cursorPosition = Position.zero

  private(set) var size = Size.zero

  private(set) var cells: [[UCell]] = []

  enum CodingKeys: String, CodingKey {

    case width
    case height
    case cells
  }

  init() {
  }

  init(from decoder: Decoder) throws {
    let values = try decoder.container(keyedBy: CodingKeys.self)

    let column = position.column
    let row = self.cells[position.row]

    if row[column].string == wordSeparator { return column }

    for i in (0..<column).reversed() {
      if row[i].string == wordSeparator { return min(i + 1, self.size.width - 1) }
    }

    return 0
