aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2010-10-15 19:42:03 +0000
committerTom Feist <shabble@metavore.org>2010-10-15 19:42:03 +0000
commite1a07cf133508b6cae049ded0b6b37b52e6fda47 (patch)
treede4567c36e83ce871183d3dfb0a8719d41b7bf6b /vim-mode
parentvim_mode: resolved backslash display issue in vim status item (diff)
downloadirssi-scripts-e1a07cf133508b6cae049ded0b6b37b52e6fda47.tar.gz
irssi-scripts-e1a07cf133508b6cae049ded0b6b37b52e6fda47.zip
vim_mode: escaped % in _set_prompt so uberprompt displays them correctly.
Diffstat (limited to 'vim-mode')
-rw-r--r--vim-mode/vim_mode.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 3cdae0b..cce0700 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -2897,6 +2897,11 @@ sub _set_prompt {
my $msg = shift;
# add a leading space unless we're trying to clear it entirely.
$msg = ' ' . $msg if length $msg;
+
+ # escape % symbols. This prevents any _set_prompt calls from using
+ # colouring sequences.
+ $msg =~ s/%/%%/g;
+
Irssi::signal_emit('change prompt', $msg, 'UP_INNER');
}