From 2e3411ed7741c8d4cfac721de7689dd7996858a0 Mon Sep 17 00:00:00 2001 From: Pablo Báez Date: Thu, 6 Oct 2016 17:47:36 -0300 Subject: Makes the script to count logical characters. Otherwise the cursor isn't moved to the end when special characters are used in the input field. --- scripts/aspell.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/aspell.pl b/scripts/aspell.pl index b6a254e..426dbd9 100644 --- a/scripts/aspell.pl +++ b/scripts/aspell.pl @@ -85,6 +85,7 @@ See README file. use warnings; use strict; use Data::Dumper; +use Encode 'decode'; use Irssi; use Irssi::Irc; use Irssi::TextUI; @@ -391,7 +392,8 @@ sub spellcheck_finish { # stick the cursor at the end of the input line? my $input = _input(); - my $end = length($input); + my $charset = lc Irssi::settings_get_str('term_charset'); + my $end = length(decode $charset=>$input); Irssi::gui_input_set_pos($end); } -- cgit v1.2.3 From f54128f189c0896175336846fe8ee3b1eb48b26e Mon Sep 17 00:00:00 2001 From: Pablo Báez Date: Thu, 6 Oct 2016 17:55:58 -0300 Subject: Jump to next misspelled word when pressing SPC --- scripts/aspell.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/aspell.pl b/scripts/aspell.pl index 426dbd9..71369f3 100644 --- a/scripts/aspell.pl +++ b/scripts/aspell.pl @@ -108,7 +108,7 @@ if ($@ && $@ =~ m/Can't locate/) { } -our $VERSION = '1.6.1'; +our $VERSION = '1.6.2'; our %IRSSI = ( authors => 'Isaac Good (yitz_), Tom Feist (shabble)', contact => 'irssi@isaacgood.com, shabble+irssi@metavore.org', @@ -307,6 +307,7 @@ sub process_word { } else { print_suggestions(); + highlight_incorrect_word($word_obj); } } else { -- cgit v1.2.3