message: don't execute key handlers all the time
diff: @@ -93,15 +93,15 @@ function SuggestionsBox({
  const options = showSuggestions ? mapPlugins(pluginClosure, editor) : []
  const closure = React.useRef({
  + showSuggestions,
  selected,
  options
  })
  - if (showSuggestions) {
  closure.current = {
  + showSuggestions,
  selected,
  options
  }
  - }
  React.useEffect(() => {
  if (options.length < selected) {
  setSelected(0)
  @@ -117,26 +117,32 @@ function SuggestionsBox({
  }}
  handlers={{
  DEC: () => {
  + if (closure.current.showSuggestions) {
  setSelected(currentSelected => {
  const optionsCount = closure.current.options.length
  if (optionsCount === 0) return 0
  return (currentSelected + optionsCount - 1) % optionsCount
  })
  + }
  },
  INC: () => {
  + if (closure.current.showSuggestions) {
  setSelected(currentSelected => {
  const optionsCount = closure.current.options.length
  if (optionsCount === 0) return 0
  return (currentSelected + 1) % optionsCount
  })
  + }
  },
  INSERT: () => {
  + if (closure.current.showSuggestions) {
  const option = closure.current.options[closure.current.selected]
  if (!option) return
  setTimeout(() => {
  insertPlugin(editor)(option[1])
  })
  }
  + }
  }}
  >
  {children}
  