diff options
| author | Teddy Wing | 2017-12-16 21:11:21 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-12-16 21:11:21 +0100 |
| commit | 944625d9a600d1f70ce5026437856b7eb97b2074 (patch) | |
| tree | 1d158deefd63d04e9f9e0e63a119dd2888b3dd6e | |
| parent | 22203ce9b5b95d37d2221e67e9e1d045f7830740 (diff) | |
| download | irssi-vimput-944625d9a600d1f70ce5026437856b7eb97b2074.tar.bz2 | |
Distinguish between commands and input in pipe reader
Have a way to determine the difference between an input text and a
message containing the temp file name.
| -rw-r--r-- | vimput.pl | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -254,12 +254,12 @@ sub pipe_input { my $input = <$read_handle>; - # if (index($input, VIMPUT_IPC_COMMAND_PREFIX) == 0) { - # print substr $input, length(VIMPUT_IPC_COMMAND_PREFIX); - # } - # else { + if (index($input, VIMPUT_IPC_COMMAND_PREFIX) == 0) { + print substr $input, length(VIMPUT_IPC_COMMAND_PREFIX); + } + else { print 'I: ' . $input; - # } + } # TODO: Add $forked to not spawn more than one children unnecessarily |
