Skip to content

Commit 678a1ca

Browse files
author
skywind3000
committed
Fix minimum and maximum width and height configurations in navigator plugin to ensure proper display in vim. Update the configurations to handle integers properly and adjust dimensions if popup is centered and visible.
1 parent 706b54d commit 678a1ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/navigator/config.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,17 @@ function! navigator#config#init(opts) abort
336336
let opts.max_width = navigator#config#get(opts, 'max_width')
337337
let opts.min_height = navigator#config#get(opts, 'min_height')
338338
let opts.max_height = navigator#config#get(opts, 'max_height')
339+
let opts.min_width = navigator#config#atoi(opts.min_width, &columns)
340+
let opts.max_width = navigator#config#atoi(opts.max_width, &columns)
341+
let opts.min_height = navigator#config#atoi(opts.min_height, &lines)
342+
let opts.max_height = navigator#config#atoi(opts.max_height, &lines)
339343
if opts.min_width > opts.max_width
340344
let opts.min_width = opts.max_width
341345
endif
342346
if opts.min_height > opts.max_height
343347
let opts.min_height = opts.max_height
344348
endif
345-
if opts.popup_position == 'center' && opts.popup
349+
if opts.popup_position == 'center' && opts.popup != 0
346350
let opts.min_width = opts.popup_width
347351
let opts.max_width = opts.popup_width
348352
let opts.min_height = opts.popup_height

0 commit comments

Comments
 (0)