aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
authorPascal Sommer2023-01-11 02:11:43 +0000
committerGitHub2023-01-11 02:11:43 +0000
commit75dfaff33891d0505e3018a8357fa0619ef1fcc2 (patch)
treef20cc068b867d70933374380631f00eabf0318fa /helix-view/src/editor.rs
parenta8248c50e1017cbba42c602d480d3c4ffa7162a0 (diff)
Add some function documentations (#5360)
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 3521077e..547a4ffb 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1341,6 +1341,8 @@ impl Editor {
.find(|doc| doc.path().map(|p| p == path.as_ref()).unwrap_or(false))
}
+ /// Gets the primary cursor position in screen coordinates,
+ /// or `None` if the primary cursor is not visible on screen.
pub fn cursor(&self) -> (Option<Position>, CursorKind) {
let config = self.config();
let (view, doc) = current_ref!(self);