Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Rewrite documentation comment for right movement (#32547)

fantacell1a321b51df61
diff --git a/crates/editor/src/movement.rs b/crates/editor/src/movement.rs
index eba1f26dccf..75645bbaa29 100644
--- a/crates/editor/src/movement.rs
+++ b/crates/editor/src/movement.rs
@@ -58,8 +58,8 @@ pub fn saturating_left(map: &DisplaySnapshot, mut point: DisplayPoint) -> Displa
map.clip_point(point, Bias::Left)
}
-/// Returns a column to the right of the current point, doing nothing
-// if that point is at the end of the line.
+/// Returns a column to the right of the current point, wrapping
+/// to the next line if that point is at the end of line.
pub fn right(map: &DisplaySnapshot, mut point: DisplayPoint) -> DisplayPoint {
if point.column() < map.line_len(point.row()) {
*point.column_mut() += 1;