Skip to content

Commit

Permalink
Improved the floating window
Browse files Browse the repository at this point in the history
Now it is possible to scroll the preview window using a mouse. Also, the
floating window is now of 'minimal' style to prevent characters wrapping
to the next line (which previously happened with signcolumn=yes)

Closes #16
  • Loading branch information
subnut authored and roxma committed Nov 3, 2020
1 parent 3c2e230 commit f9ed1c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/float_preview.vim
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func! s:check(...)
endif
let prevw_height = float_preview#display_height(info, prevw_width) + 1

let opt = { 'focusable': v:false,
let opt = { 'focusable': v:true,
\ 'width': prevw_width,
\ 'height': prevw_height
\}
Expand Down Expand Up @@ -121,6 +121,7 @@ func! s:check(...)
let opt.col = 0
else
let opt.relative = 'editor'
let opt.style = 'minimal'

if s:event.scrollbar
let right_avail_col = s:event.col + s:event.width + 1
Expand Down

0 comments on commit f9ed1c7

Please sign in to comment.