aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/client/search/cursor.rs
diff options
context:
space:
mode:
authorConrad Ludgate <conradludgate@gmail.com>2022-09-12 20:39:41 +0100
committerGitHub <noreply@github.com>2022-09-12 20:39:41 +0100
commitdb2a00f45623d284f17dfe8c0f9eca1a401c25a6 (patch)
treeb32e86cf79b44389c72370a0b374400edaa6f653 /src/command/client/search/cursor.rs
parentupdate default layout (#523) (diff)
downloadatuin-db2a00f45623d284f17dfe8c0f9eca1a401c25a6.zip
custom history list (#524)
* use custom list impl * fmt * segment * clean up * fix offsets * fix scroll back space * small touch ups
Diffstat (limited to 'src/command/client/search/cursor.rs')
-rw-r--r--src/command/client/search/cursor.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/client/search/cursor.rs b/src/command/client/search/cursor.rs
index 1d0e6b8e..da2be45e 100644
--- a/src/command/client/search/cursor.rs
+++ b/src/command/client/search/cursor.rs
@@ -14,6 +14,10 @@ impl Cursor {
self.source.as_str()
}
+ pub fn into_inner(self) -> String {
+ self.source
+ }
+
/// Returns the string before the cursor
pub fn substring(&self) -> &str {
&self.source[..self.index]