#8447: TextView GetText() doesn't straddle the "Gap" properly ----------------------------------+---------------------------- Reporter: Pete | Owner: axeld Type: bug | Status: new Priority: critical | Milestone: R1/alpha5 Component: Kits/Interface Kit | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: 11132 Has a Patch: 1 | Platform: All ----------------------------------+---------------------------- Comment (by Pete): Replying to [comment:4 stippi]: > Patch looks like it makes a lot of sense, if fGapIndex is the start of the gap in fBuffer in Bytes and fGapCount is the number of Bytes that the gap is long. If any of them are in glyph offsets however (so not counting UTF-8 multi-byte chars), then the patch would be wrong (and the existing code broken in one more way). Looking through the code again, as far as I can see, everything is always in bytes, so I think it should work in all situations. Shamefully, I don't think I ever noticed the ''other'' GetText --just followed the failing call -- but now I see that it uses RealCharAt(...), which has exactly the logic in my patch, except that it's single chars. -- Ticket URL: <https://dev.haiku-os.org/ticket/8447#comment:7> Haiku <https://dev.haiku-os.org> Haiku - the operating system.