From e1f7d907a26194f696a6d9984f2ae7172fd5c146 Mon Sep 17 00:00:00 2001 From: sammyette Date: Sun, 29 Dec 2024 21:50:37 -0400 Subject: [PATCH] feat: expand abbr on enter --- nature/abbr.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nature/abbr.lua b/nature/abbr.lua index 82b4095..3e251d4 100644 --- a/nature/abbr.lua +++ b/nature/abbr.lua @@ -21,7 +21,8 @@ hilbish.abbr.add { } bait.catch('hilbish.rawInput', function(c) - if c == ' ' then -- space + -- 0x0d == enter + if c == ' ' or c == string.char(0x0d) then -- check if the last "word" was a valid abbreviation local line = hilbish.editor.getLine() local lineSplits = string.split(line, ' ')