Refactor cursor API in Editor

Co-authored-by: Neeraj Jaiswal <neerajj85@gmail.com>
This commit is contained in:
Héctor Ramón Jiménez 2025-12-01 19:40:36 +01:00
parent 2ac62f7512
commit 63e9eeffb5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 95 additions and 47 deletions

View file

@ -190,9 +190,13 @@ impl Editor {
}),
space::horizontal(),
text({
let (line, column) = self.content.cursor_position();
let cursor = self.content.cursor();
format!("{}:{}", line + 1, column + 1)
format!(
"{}:{}",
cursor.position.line + 1,
cursor.position.column + 1
)
})
]
.spacing(10);