]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Makes the script to count logical characters. Otherwise the cursor isn't moved to...
authorPablo Báez <redacted>
Thu, 6 Oct 2016 20:47:36 +0000 (17:47 -0300)
committerPablo Báez <redacted>
Thu, 6 Oct 2016 20:47:36 +0000 (17:47 -0300)
scripts/aspell.pl

index b6a254ecff18ced1a5c07e09daaa17dbbcf669af..426dbd97a35763c1230986b77deeebbbd432644d 100644 (file)
@@ -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);
 }
 
git clone https://git.99rst.org/PROJECT