1
0
forked from aniani/vim

patch 9.1.0888: leftcol property not available in getwininfo()

Problem:  leftcol property not available in getwininfo()
Solution: add leftcol property property (glepnir)

closes: #16119

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
glepnir
2024-11-25 19:39:04 +01:00
committed by Christian Brabandt
parent ea49002aca
commit 0a850673e3
4 changed files with 18 additions and 1 deletions

View File

@@ -426,6 +426,7 @@ get_win_info(win_T *wp, short tpnr, short winnr)
dict_add_number(dict, "wincol", wp->w_wincol + 1);
dict_add_number(dict, "textoff", win_col_off(wp));
dict_add_number(dict, "bufnr", wp->w_buffer->b_fnum);
dict_add_number(dict, "leftcol", wp->w_leftcol);
#ifdef FEAT_TERMINAL
dict_add_number(dict, "terminal", bt_terminal(wp->w_buffer));

View File

@@ -115,6 +115,18 @@ func Test_getbufwintabinfo()
wincmd t | only
endfunc
function Test_get_wininfo_leftcol()
set nowrap
set winwidth=10
vsp
call setline(1, ['abcdefghijklmnopqrstuvwxyz'])
norm! 5zl
call assert_equal(5, getwininfo()[0].leftcol)
bwipe!
set wrap&
set winwidth&
endfunc
function Test_get_buf_options()
let opts = bufnr()->getbufvar('&')
call assert_equal(v:t_dict, type(opts))

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
888,
/**/
887,
/**/