Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created August 18, 2012 09:47
Show Gist options
  • Select an option

  • Save tshirtman/3385709 to your computer and use it in GitHub Desktop.

Select an option

Save tshirtman/3385709 to your computer and use it in GitHub Desktop.
$correction_window = Irssi::window_find_name('corrections');
if ($correction_window)
{
$w = $correction_window;
}
else
{
$w = $win;
}
# we found a mistake, print suggestions
$word =~ s/%/%%/g;
my $color = Irssi::settings_get_str('spellcheck_word_color');
if (scalar @$suggestions > 0)
{
$w->print("Suggestions for $color$word%N - " . join(", ", @$suggestions));
}
else
{
$w->print("No suggestions for $color$word%N");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment