Keep new changes on right
Saves and restores splitright option
This commit is contained in:
parent
e81277ecb4
commit
512df2948e
@ -78,6 +78,11 @@ def main() -> None:
|
|||||||
args = parse_args()
|
args = parse_args()
|
||||||
vimCmdFile = tempfile.NamedTemporaryFile(mode='w', delete=False)
|
vimCmdFile = tempfile.NamedTemporaryFile(mode='w', delete=False)
|
||||||
with vimCmdFile:
|
with vimCmdFile:
|
||||||
|
cmds = f"""
|
||||||
|
let s:spr = &splitright
|
||||||
|
set splitright
|
||||||
|
"""
|
||||||
|
print(cmds, file=vimCmdFile)
|
||||||
for a, b in get_file_pairs(args.pathA, args.pathB):
|
for a, b in get_file_pairs(args.pathA, args.pathB):
|
||||||
aPath = a.resolve() if a else os.devnull
|
aPath = a.resolve() if a else os.devnull
|
||||||
bPath = b.resolve() if b else os.devnull
|
bPath = b.resolve() if b else os.devnull
|
||||||
@ -89,6 +94,7 @@ def main() -> None:
|
|||||||
continue
|
continue
|
||||||
print(f"tabedit {aPath} | vsp {bPath}", file=vimCmdFile)
|
print(f"tabedit {aPath} | vsp {bPath}", file=vimCmdFile)
|
||||||
cmds = f"""
|
cmds = f"""
|
||||||
|
let &splitright = s:spr
|
||||||
tabdo windo :1
|
tabdo windo :1
|
||||||
tabdo windo diffthis
|
tabdo windo diffthis
|
||||||
tabdo windo diffupdate
|
tabdo windo diffupdate
|
||||||
|
Loading…
Reference in New Issue
Block a user