diff options
| author | Teddy Wing | 2017-12-17 00:50:21 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2017-12-17 00:50:21 +0100 | 
| commit | 92dc1fd0afa742d2a2002461f0a2d1d7db6d24a0 (patch) | |
| tree | 6584ef3f7b22219d61c6dd2eda9da530a8d6f4a9 /vimput.pl | |
| parent | dee27d5ae7f3c56c3eff00c8b09a28b9e44516f9 (diff) | |
| download | irssi-vimput-92dc1fd0afa742d2a2002461f0a2d1d7db6d24a0.tar.bz2 | |
Add documentation comments
Diffstat (limited to 'vimput.pl')
| -rw-r--r-- | vimput.pl | 10 | 
1 files changed, 10 insertions, 0 deletions
| @@ -58,6 +58,9 @@ sub open_tmux_split {  } +# Forks a child process and opens a pipe for the child to communicate with +# the parent. In the child process, open a Tmux split, create a FIFO pipe, +# and send the contents of the FIFO to the parent.  sub open_tmux_and_update_input_line_when_finished {  	return if $forked; @@ -90,6 +93,7 @@ sub open_tmux_and_update_input_line_when_finished {  			POSIX::_exit(1);  		}; +		# The input line will be sent from Vim on this FIFO.  		mkfifo($fifo_path, 0600) or do {  			print $write_handle ERROR_PREFIX . "Failed to make FIFO: $!"; @@ -134,6 +138,9 @@ sub open_tmux_and_update_input_line_when_finished {  } +# Read messages in the parent process from the child over a pipe. Print error +# messages to the Irssi window. An OK message will be used to replace the +# current input line.  sub pipe_input {  	my ($args) = @_;  	my ($read_handle, $pipe_tag) = @$args; @@ -159,6 +166,7 @@ sub pipe_input {  } +# Test whether `$pid` is a child process.  sub is_child_fork {  	my ($pid) = @_; @@ -166,6 +174,7 @@ sub is_child_fork {  } +# Test whether `$string` starts with `ERROR_PREFIX`.  sub is_error_message {  	my ($string) = @_; @@ -173,6 +182,7 @@ sub is_error_message {  } +# Test whether `$string` starts with `OK_PREFIX`.  sub is_ok_message {  	my ($string) = @_; | 
