Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions plugin/winresizer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,21 @@ endfun
" Decide behavior of up, down, left and right key .
" (to increase or decrease window size)
fun! s:getResizeBehavior()
let signs = {'left':'-', 'down':'+', 'up':'-', 'right':'+'}
" There are two situations (window's position):
" 1. left and bottom: the right and upper lines move (default)
" 2. the others (right and upper): the left and bottom lines move
let signs = {'left':'-', 'down':'-', 'up':'+', 'right':'+'}
let result = {}
let ei = winresizer#getEdgeInfo()
if !ei['left'] && ei['right']

if !ei['left'] " the right windows: left line
let signs['left'] = '+'
let signs['right'] = '-'
endif
if !ei['up'] && ei['down']
let signs['up'] = '+'
let signs['down'] = '-'

if !ei['down'] " the upper windows: bottom line
let signs['up'] = '-'
let signs['down'] = '+'
endif
return signs
endfun
Expand Down