跳到正文
Zed Blog· Thorsten Ball, Nathan Sobo, Antonio Scandurra·· 2024-06-27AI 评分15

Zed 中的文本坐标系统:Point、Offset、UTF-16 与 DisplayPoint

Text Coordinate Systems

AI 导读

Zed 的文本坐标系统不止行列两种,还包括 Offset、OffsetUtf16、PointUtf16、DisplayPoint 和 Anchor。Point 由 row 和 column 组成并遵循"打字机逻辑",换行时列数归零;Offset 以字节数表示文档绝对位置,适合跨行选择。

来源:Zed Blog · zed.dev