git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restore window height when leaving Vim.
[profile.git]
/
.vim
/
script
/
p4
diff --git
a/.vim/script/p4
b/.vim/script/p4
index
fe7f252
..
3dd4217
100644
(file)
--- a/
.vim/script/p4
+++ b/
.vim/script/p4
@@
-21,7
+21,7
@@
fun! P4submit()
set nomod
" Get the files in the changelist.
set nomod
" Get the files in the changelist.
- let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\
\1
@p' " . bufname(""))
+ let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\
"\\1\"
@p' " . bufname(""))
" Create a new window, move it below the spec and read in a diff.
botright new
if l:files != ""
" Create a new window, move it below the spec and read in a diff.
botright new
if l:files != ""
@@
-37,7
+37,7
@@
fun! P4submit()
set buftype=nowrite
set bufhidden=hide
setlocal noswapfile
set buftype=nowrite
set bufhidden=hide
setlocal noswapfile
- file [p4 diff]
+ file [p4 diff
\
]
" Switch back to the top window and put the cursor by the description.
wincmd k
" Switch back to the top window and put the cursor by the description.
wincmd k
@@
-57,9
+57,6
@@
endfun
let s:cmdheight = &cmdheight
set cmdheight=3
let s:cmdheight = &cmdheight
set cmdheight=3
-" Change directory so "file [p4 diff]" doesn't try to cd somewhere.
-cd /
-
" Call and then discard our function.
call P4submit()
delfunction P4submit
" Call and then discard our function.
call P4submit()
delfunction P4submit