Skip to content

Commit 01d747c

Browse files
authored
feat: Start no profile powershell process (#68)
1 parent fec4db1 commit 01d747c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugin/mdip.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function! s:SaveFileTMPWSL(imgdir, tmpname) abort
3636
let tmpfile = '\\\\wsl\$\\Ubuntu'.tmpfile
3737
endif
3838

39-
let clip_command = 'powershell.exe -sta "Add-Type -Assembly PresentationCore;'.
39+
let clip_command = 'powershell.exe -nologo -noprofile -noninteractive -sta "Add-Type -Assembly PresentationCore;'.
4040
\'\$img = [Windows.Clipboard]::GetImage();'.
4141
\'if (\$img -eq \$null) {'.
4242
\'echo "Do not contain image.";'.
@@ -96,7 +96,7 @@ function! s:SaveFileTMPWin32(imgdir, tmpname) abort
9696
let clip_command .= "if ($([System.Windows.Forms.Clipboard]::ContainsImage())) {"
9797
let clip_command .= "[System.Drawing.Bitmap][System.Windows.Forms.Clipboard]::GetDataObject().getimage().Save('"
9898
let clip_command .= tmpfile ."', [System.Drawing.Imaging.ImageFormat]::Png) }"
99-
let clip_command = "powershell -sta \"".clip_command. "\""
99+
let clip_command = "powershell -nologo -noprofile -noninteractive -sta \"".clip_command. "\""
100100

101101
silent call system(clip_command)
102102
if v:shell_error == 1

0 commit comments

Comments
 (0)