From 400ff3c07bcd156b28870b0635c5f2b73c49e9c8 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 12 Jan 2025 12:20:45 -0500 Subject: mollyguard.pl: added (ignore Enter key right after single-quote). --- complete_text.pl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'complete_text.pl') diff --git a/complete_text.pl b/complete_text.pl index bac2fa0..8917d60 100644 --- a/complete_text.pl +++ b/complete_text.pl @@ -127,10 +127,19 @@ sub setup_changed { load_static_seen(); } +sub typo { + my $text = shift; + for(split(/\s+/, $text)) { + delete $seen{$_}; + } + @dict = keys %seen; +} + load_static_seen(); signal_add_last('setup changed', \&setup_changed); signal_add_last('complete word', \&complete_word); command_bind('dumpdict', \&dumpdict); +command_bind('typo', \&typo); for( "message public", "message private", -- cgit v1.2.3