Refactor cursor API in Editor
Co-authored-by: Neeraj Jaiswal <neerajj85@gmail.com>
This commit is contained in:
parent
2ac62f7512
commit
63e9eeffb5
5 changed files with 95 additions and 47 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue