开发者

NSLayoutManager setAllowsNonContiguousLayout misplaces caret

With setAllowsNonContiguousLayout set to YES, if I perform the following steps I get weird behaviour:

  1. Sel开发者_如何学运维ect all text in the NSTextView
  2. Hit backspace to remove all the text
  3. Type a few lines of text
  4. Trying using backspace to delete the text again

At step 4 the cursor jumps up to the line above and at a seemingly random point on the line, yet the actual glyphs are deleted from the correct location.

Is non-contiguous layout a bit experimental/buggy like this? If I turn it off things work as expected.

I'll file a bug report with Apple, but has anybody else seen this behaviour and worked around it?


A bug report is the right way to go, I think. From what I've heard is that non-contignuous layout has caused lots of headaches to some developers making them drop that feature again from their application. As nice as it sounds, it seemingly is hell of a thing to get to work right ... even for Apple.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜