I see an issue in your sample code;
You don't need $term->addhistory($note) if $note =~ /\S/; - The readline method already adds to the history.
But using addhistory you are doubling everything in your history.
Comment on Re: Term::ReadLine handle wide character poorly
indeed, I preload some history by
$term->addhistory($_) foreach split "\n", $tasks[$selectedtask]{note} // "";
I assume its all manually, and perldoc also give example like this.
thx