NSTextView的插入点绘制位置异常 [英] NSTextView's Insertion Point draws position exceptions
问题描述
这应该是一个错误,因为我可以和朋友们一起复制它.
This should be a Bug, because I can reproduce it with my friends.
我刚刚设置了NSTextView的allowNonContiguous Layout. layoutManager为true,这就是问题所在.
I just set allowsNonContiguous Layout of NSTextView. layoutManager to true, and that's the problem.
在编辑器中,我首先输入N空行,即按N次返回.然后返回到我们输入的第二行,并在插入点消失时按任意键,这将使我的插入点不正确.
In the editor, I first enter N blank lines, that is, press N times to return. Then go back to the second line of our input, and press any key at the moment insertion Point disappears, which will make my insertion Point incorrect.
这是我的演示: https://github.com/iiiDD/TextViewDemo
推荐答案
I had the same problem. I’ve detailed how I’ve fixed this bug here : NSTextView cursor doesn't appear when typing text on macOS 10.14
这篇关于NSTextView的插入点绘制位置异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!