We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents de2ab89 + b751080 commit 6a15c23Copy full SHA for 6a15c23
1 file changed
autoload/winresizer.vim
@@ -61,11 +61,21 @@ endfun
61
fun! winresizer#swapWindow(to)
62
let curNum = winnr()
63
let curBuf = bufnr( "%" )
64
+ if has('patch-8.1.2018')
65
+ let curMatch = getmatches(curNum)
66
+ endif
67
exe a:to . "wincmd w"
- let toBuf = bufnr( "%" )
68
+ let toBuf = bufnr( "%" )
69
70
+ let toMatch = getmatches(a:to)
71
72
exe 'hide buf' curBuf
73
exe curNum . "wincmd w"
74
exe 'hide buf' toBuf
75
76
+ call setmatches(curMatch, a:to)
77
+ call setmatches(toMatch, curNum)
78
79
exe a:to ."wincmd w"
80
endfun
81
0 commit comments