mirror of
https://github.com/nushell/reedline.git
synced 2024-09-11 23:57:21 +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
|
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.
|
/// Returns the current contents of the input buffer.
|
||||||
pub fn current_buffer_contents(&self) -> &str {
|
pub fn current_buffer_contents(&self) -> &str {
|
||||||
self.editor.get_buffer()
|
self.editor.get_buffer()
|
||||||
|
Loading…
Reference in New Issue
Block a user