Fixes #83366: buffer is updated when the selection changes.
Merge pull request #140 from luisromangz/8.5-SNAPSHOT-83366

Fixes #83366: buffer is updated when the selection changes.