Skip to content

Commit

Permalink
Remove row/col
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed Jan 14, 2021
1 parent e02faf1 commit 0d1769e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
19 changes: 5 additions & 14 deletions autoload/vital/__vital__/VS/Vim/Window.vim
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ if has('nvim')
function! s:info(win) abort
let l:info = getwininfo(a:win)[0]
return {
\ 'row': l:info.winrow - 1,
\ 'col': l:info.wincol - 1,
\ 'width': l:info.width,
\ 'height': l:info.height,
\ 'topline': l:info.topline,
Expand All @@ -71,8 +69,6 @@ else
if exists('*popup_list') && index(popup_list(), a:win) >= 0
let l:info = popup_getpos(a:win)
return {
\ 'row': l:info.line - 1,
\ 'col': l:info.col - 1,
\ 'width': l:info.width,
\ 'height': l:info.height,
\ 'topline': l:info.firstline
Expand All @@ -81,17 +77,12 @@ else

let l:ctx = {}
let l:ctx.info = {}
function! l:ctx.callback(win) abort
let l:info = getwininfo(a:win)[0]
let self.info = {
\ 'row': l:info.winrow - 1,
\ 'col': l:info.wincol - 1,
\ 'width': l:info.width,
\ 'height': l:info.height,
\ 'topline': l:info.topline,
\ }
function! l:ctx.callback() abort
let self.info.width = winwidth(0)
let self.info.height = winheight(0)
let self.info.topline = line('w0')
endfunction
call s:do(a:win, { -> l:ctx.callback(a:win) })
call s:do(a:win, { -> l:ctx.callback() })
return l:ctx.info
endfunction
endif
Expand Down
4 changes: 0 additions & 4 deletions autoload/vital/__vital__/VS/Vim/Window.vimspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ Describe vital#__vital__#VS#Vim#Window
\ 'width': winwidth(0),
\ 'height': winheight(0),
\ 'topline': 1,
\ 'row': 1,
\ 'col': 0,
\ })
End

Expand All @@ -65,8 +63,6 @@ Describe vital#__vital__#VS#Vim#Window
\ 'width': 10,
\ 'height': 10,
\ 'topline': 1,
\ 'row': 0,
\ 'col': 0,
\ })

call l:window.close()
Expand Down

0 comments on commit 0d1769e

Please sign in to comment.