Skip to content

Commit 1761eb6

Browse files
committed
No need to change path format for windows. Revert it.
1 parent f7a7851 commit 1761eb6

2 files changed

Lines changed: 66 additions & 2 deletions

File tree

Session.vim

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
let SessionLoad = 1
2+
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
3+
let v:this_session=expand("<sfile>:p")
4+
silent only
5+
silent tabonly
6+
cd ~/AppData/Local/nvim-data/lazy/img-paste.vim
7+
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
8+
let s:wipebuf = bufnr('%')
9+
endif
10+
let s:shortmess_save = &shortmess
11+
if &shortmess =~ 'A'
12+
set shortmess=aoOA
13+
else
14+
set shortmess=aoO
15+
endif
16+
badd +240 plugin/mdip.vim
17+
argglobal
18+
%argdel
19+
$argadd ~/AppData/Local/nvim-data/lazy/img-paste.vim
20+
edit plugin/mdip.vim
21+
wincmd t
22+
let s:save_winminheight = &winminheight
23+
let s:save_winminwidth = &winminwidth
24+
set winminheight=0
25+
set winheight=1
26+
set winminwidth=0
27+
set winwidth=1
28+
argglobal
29+
setlocal fdm=manual
30+
setlocal fde=0
31+
setlocal fmr={{{,}}}
32+
setlocal fdi=#
33+
setlocal fdl=0
34+
setlocal fml=1
35+
setlocal fdn=20
36+
setlocal fen
37+
silent! normal! zE
38+
let &fdl = &fdl
39+
let s:l = 240 - ((19 * winheight(0) + 13) / 27)
40+
if s:l < 1 | let s:l = 1 | endif
41+
keepjumps exe s:l
42+
normal! zt
43+
keepjumps 240
44+
normal! 016|
45+
tabnext 1
46+
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
47+
silent exe 'bwipe ' . s:wipebuf
48+
endif
49+
unlet! s:wipebuf
50+
set winheight=1 winwidth=20
51+
let &shortmess = s:shortmess_save
52+
let &winminheight = s:save_winminheight
53+
let &winminwidth = s:save_winminwidth
54+
let s:sx = expand("<sfile>:p:r")."x.vim"
55+
if filereadable(s:sx)
56+
exe "source " . fnameescape(s:sx)
57+
endif
58+
let &g:so = s:so_save | let &g:siso = s:siso_save
59+
set hlsearch
60+
nohlsearch
61+
let g:this_session = v:this_session
62+
let g:this_obsession = v:this_session
63+
doautoall SessionLoadPost
64+
unlet SessionLoad
65+
" vim: set ft=vim :

plugin/mdip.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ function! mdip#MarkdownClipboardImage()
237237
else
238238
" let relpath = s:SaveNewFile(g:mdip_imgdir, tmpfile)
239239
let extension = split(tmpfile, '\.')[-1]
240-
let sep = has('win32') ? '\' : '/'
241-
let relpath = g:mdip_imgdir_intext . sep . g:mdip_tmpname . '.' . extension
240+
let relpath = g:mdip_imgdir_intext . '/' . g:mdip_tmpname . '.' . extension
242241
if call(get(g:, 'PasteImageFunction'), [relpath])
243242
return
244243
endif

0 commit comments

Comments
 (0)