aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/register.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-core/src/register.rs b/helix-core/src/register.rs
index 7fa34644..1cff77ba 100644
--- a/helix-core/src/register.rs
+++ b/helix-core/src/register.rs
@@ -73,6 +73,10 @@ impl Registers {
self.read(name).and_then(|entries| entries.first())
}
+ pub fn last(&self, name: char) -> Option<&String> {
+ self.read(name).and_then(|entries| entries.last())
+ }
+
pub fn inner(&self) -> &HashMap<char, Register> {
&self.inner
}