From 2516370bb6cf090e03e99e54eab243330971247e Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Wed, 7 Oct 2009 07:20:28 +0000 Subject: [PATCH] --- index.cgi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.cgi b/index.cgi index 1c26eff..cdfaa82 100755 --- a/index.cgi +++ b/index.cgi @@ -59,8 +59,7 @@ function do_print { # Create a temp file with the provided modeline output="$(mktemp)" tmp="$(mktemp)" - cat "$input" >> "$tmp" - get_modeline >> "$tmp" + sed "1a$(get_modeline)" "$input" > "$tmp" # - I have some plugins in ~/.vim # - Run ex in screen to trick it into thinking that it @@ -68,7 +67,7 @@ function do_print { # term=xterm-256color in vimrc HOME=/home/andy \ screen -D -m ex -u vimrc \ - '+$d|'$trim \ + '+2d|'$trim \ '+%s/ //g' \ '+TOhtml' \ "+sav! $output" \ -- 2.43.2