message: Set suitable size of autocomplete if the total height is geater than the screen (mac)
diff: @@ -72,6 +72,10 @@ protocol AutoCompleteViewDelegate: class {
  final class AutoCompleteView: NSView {
  + private struct Constants {
  + static let CreateButtonHeight: CGFloat = 40
  + }
  +
  // MARK: OUTLET
  @IBOutlet weak var tableView: KeyboardTableView!
  @@ -105,6 +109,18 @@ final class AutoCompleteView: NSView {
  }
  func update(height: CGFloat) {
  + var height = height
  + let screenFrame = self.window!.convertToScreen(frame)
  + let topLeftY = screenFrame.origin.y + screenFrame.size.height
  + var offset: CGFloat = createNewItemContainerView.isHidden ? 0 : Constants.CreateButtonHeight
  + offset -= 2 // No collision with screen
  +
  + // Reduce the size if the height is greater than screen
  + if (height + offset) > topLeftY {
  + height = topLeftY - offset
  + }
  +
  + // Overriden
  tableViewHeight.constant = height
  }
  