mirror of
https://github.com/nushell/reedline.git
synced 2024-08-17 20:00:49 +03:00
feat: add current_insertion_point()
to return the current insertion point of the input buffer (#573)
This commit is contained in:
parent
f6b23420e2
commit
a366cf2926
@ -510,6 +510,11 @@ impl Reedline {
|
||||
result
|
||||
}
|
||||
|
||||
/// Returns the current insertion point of the input buffer.
|
||||
pub fn current_insertion_point(&self) -> usize {
|
||||
self.editor.insertion_point()
|
||||
}
|
||||
|
||||
/// Returns the current contents of the input buffer.
|
||||
pub fn current_buffer_contents(&self) -> &str {
|
||||
self.editor.get_buffer()
|
||||
|
Loading…
Reference in New Issue
Block a user