Skip to content

Commit

Permalink
Update the list view width after showing the popup (#7698)
Browse files Browse the repository at this point in the history
`update-list-view!` reported incorrect (zero) widths for list items before it is added to the scene. This results in the popup being not wide enough when showing suggestions. Performing another refresh later solves the issue.

Related to #7692
  • Loading branch information
vlaaad committed May 30, 2023
1 parent f80abfa commit b435988
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/src/clj/editor/code/view.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,8 @@
KeyCode/ENTER (accept! (first (ui/selection list-view)))
KeyCode/ESCAPE (.hide popup)
nil))))))
(.show popup (.getWindow (.getScene canvas)) (.getX anchor) (.getY anchor)))))
(.show popup (.getWindow (.getScene canvas)) (.getX anchor) (.getY anchor))
(popup/update-list-view! list-view 200.0 results 0))))

(defn- show-no-language-server-for-resource-language-notification! [resource]
(let [language (resource/language resource)]
Expand Down

0 comments on commit b435988

Please sign in to comment.