[[ Bug 13829 ]] Prevent segment boundary calculation from truncating line width
Merge pull request #1381 from runrevali/bugfix-13829_refactor

[[ Bug 13829 ]] Prevent segment boundary calculation from truncating lin...