diff options
author | Saber Haj Rabiee | 2022-06-24 15:14:48 +0000 |
---|---|---|
committer | GitHub | 2022-06-24 15:14:48 +0000 |
commit | 3dbad0442fc3038dd0b0f6bd07ba0e40d2d92000 (patch) | |
tree | b785a62627ea7035e1cc330570c33ad4ee09724a /helix-core/src/register.rs | |
parent | d948ace67b10f162fd00106b9be2c1c680f33861 (diff) |
fixes showing the last prompt on empty input (#2870)
Diffstat (limited to 'helix-core/src/register.rs')
-rw-r--r-- | helix-core/src/register.rs | 4 |
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 } |