NSTextView的插入点绘制位置异常 [英] NSTextView's Insertion Point draws position exceptions

查看:96
本文介绍了NSTextView的插入点绘制位置异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该是一个错误,因为我可以和朋友们一起复制它.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆