diff options
Diffstat (limited to 'complete_text.pl')
-rw-r--r-- | complete_text.pl | 9 |
1 files changed, 9 insertions, 0 deletions
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", |