]> Pileus Git - vpaste/commitdiff
fix some bugs
authorAndy Spencer <andy753421@gmail.com>
Mon, 24 May 2010 02:17:52 +0000 (02:17 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 24 May 2010 02:17:52 +0000 (02:17 +0000)
index.cgi
vimrc

index b2d95504b86e1c5b0184a9e73564137c1ad13a1e..295f031c0f0c6f93a8c45b2a0d68d069e2999428 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -81,11 +81,11 @@ function do_print {
                sed "1a$(get_modeline)" "$input" > "$tmp"
 
                # - I have some plugins in ~/.vim
-               # - Run ex in a pty to trick it into thinking that it
+               # - Run ex in screen to trick it into thinking that it
                #   has a real terminal, note that we also have to set
                #   term=xterm-256color in vimrc
                HOME=/home/andy \
-               /home/andy/bin/pty ex -nXZ -i NONE -u vimrc \
+               screen -D -m ex -nXZ -i NONE -u vimrc \
                        '+set bexpr= fde= fdt= fex= inde= inex= key= pa= pexpr' \
                        '+set iconstring= ruf= stl= tal=' \
                        "+set titlestring=$1\ -\ vpaste.net" \
@@ -95,7 +95,7 @@ function do_print {
                        '+TOhtml'       \
                        "+sav! $output" \
                        '+qall!'        \
-                       "$tmp" </dev/null >/dev/null 2>&1
+                       "$tmp"
 
                header text/html
                cat "$output" 
diff --git a/vimrc b/vimrc
index c919811b966e72ada337acb4dad109c585824db4..56f60e32098cb5c07e100efc8496095ab6906b29 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -3,6 +3,7 @@
 set nocompatible
 set encoding=utf-8
 set term=xterm-256color
+set modelines=10
 
 filetype plugin indent on
 syntax on
@@ -10,4 +11,6 @@ colorscheme grey
 
 let html_use_css = 1
 let html_use_encoding = "utf8"
+let g:xterm_trim_escapes = 1
+let g:xterm_start_pattern = "^$"
 "let use_xhtml = 1