SIGN IN SIGN UP

Fix phantom cursor from deeply nested snippet merges (#279349) (#316824)

OneSnippet.merge encodes nested placeholder indices as fractions over an exponentially growing _nestingLevel (multiplied by 10 each merge). After ~16 nested merges _nestingLevel exceeds Number.EPSILON's safe range and distinct fractional indices collapse onto the same value, turning unrelated placeholders into mirrors and producing phantom cursors. Renormalize indices to small sequential integers after each merge so values stay in the safe numeric range while preserving mirror grouping and the final tabstop.
D
Dmitriy Vasyura committed
ee23ae8c211888c8b5c19a544a054ce1406b05f3
Parent: 72b2cd0
Committed by GitHub <noreply@github.com> on 5/17/2026, 1:11:41 AM