aboutsummaryrefslogtreecommitdiffstats
path: root/vimput.pl
diff options
context:
space:
mode:
Diffstat (limited to 'vimput.pl')
-rw-r--r--vimput.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/vimput.pl b/vimput.pl
index 7cba39c..0c09d36 100644
--- a/vimput.pl
+++ b/vimput.pl
@@ -12,6 +12,9 @@ our %IRSSI = {
};
+use constant CTRL_X => 24;
+
+
# The location of the temporary file where prompt contents are written.
sub tempfile {
Irssi::get_irssi_dir() . '/VIMPUT_MSG';
@@ -31,5 +34,7 @@ sub write_input {
Irssi::signal_add_last 'gui key pressed' => sub {
my ($key) = @_;
- write_input(Irssi::parse_special('$L', undef, 0));
+ if ($key eq CTRL_X) {
+ write_input(Irssi::parse_special('$L', undef, 0));
+ }
};