Skip to content

Commit

Permalink
fix crash on fast scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Mar 28, 2024
1 parent fddf314 commit 69e8fc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/webview_candidate_window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ class WebviewCandidateWindow : public CandidateWindow {
if constexpr (debug) {
std::cerr << ss.str() << "\n";
}
w_.eval(ss.str());
auto s = ss.str();
dispatch_async(dispatch_get_main_queue(), ^{
w_.eval(s);
});
}

template <typename T>
Expand Down

0 comments on commit 69e8fc3

Please sign in to comment.