Index: lang/perl/irssi/scripts/mobirc.pl
===================================================================
--- lang/perl/irssi/scripts/mobirc.pl (revision 929)
+++ lang/perl/irssi/scripts/mobirc.pl (revision 950)
@@ -52,4 +52,5 @@
         ),
         'server event' => bind_signal('irssi_irc_snotice'),
+        'print text' => bind_signal('irssi_print_text'),
         'command script unload' => \&script_unload,
     },
@@ -133,4 +134,13 @@
 }
 
+sub irssi_print_text {
+    my $poe = sweet_args;
+    my ($dest, $text, $stripped) = @{ $poe->args->[1] };
+
+    if ($dest->{level} & MSGLEVEL_HILIGHT) {
+        Mobirc::Util::update_keyword_buffer($poe, $poe->heap->{__last_row});
+    }
+}
+
 sub irssi_public {
     my $poe = sweet_args;
@@ -306,5 +316,6 @@
             $arg = decode('utf-8', $arg) unless utf8::is_utf8($arg);
         }
-        Mobirc::Util::add_message($poe, @args);
+
+        $poe->heap->{__last_row} = Mobirc::Util::add_message($poe, @args);
     }
 }
