Use flushSync when moving line editor since we need to read previous value after setting state

fix: use flushSync when moving line editor since we need to read previous value after setting state (#5508)
Use flushSync when moving line editor since we need to read previous value after setting statefixuse flushsync moving line editor since

Committed by ad1992

commit message
fix: use flushSync when moving line editor since we need to read previous value after setting state (#5508)

* fix: use flushSync when moving line editor since we need to read previous value after setting state
 
* add comment

Editor assessment

The subject does something unusual: it packs the entire rationale — flushSync is needed because the previous value must be read after setting state — into a single 100-plus-character line, which will truncate on GitHub and bury the 'what' ('fix: use flushSync when moving line editor') under the 'why'. That rationale belongs in a body sentence instead. Structure is otherwise fine, and the reasoning is genuinely valuable content that deserves a proper body slot. The lone squash fragment '* add comment' adds nothing. Good instinct, wrong placement; split what and why across header and body.

Browse categories

More fix examples · Back to search