summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-10 13:55:55 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-10 13:55:55 +0200
commite950f9992b291a07e4fb41cb561156f5b382cd5d (patch)
tree48dad4b4725b9409dccc2e0654f4fb70c9699553
parente31e256ba1769a3a3ed7840d5cc9a01ab058b8bc (diff)
downloadvim-e950f9992b291a07e4fb41cb561156f5b382cd5d.zip
patch 8.1.0041: attribute "width" missing from python window attribute list
Problem: Attribute "width" missing from python window attribute list. Solution: Add the item. (Ken Takata) Order the list like the items are used in the WindowAttr() function.
-rw-r--r--src/if_py_both.h15
-rw-r--r--src/testdir/test86.ok2
-rw-r--r--src/testdir/test87.ok2
-rw-r--r--src/version.c2
4 files changed, 17 insertions, 4 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 247fc9a08..526cbd784 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -3836,9 +3836,20 @@ get_firstwin(TabPageObject *tabObject)
else
return firstwin;
}
+
+// Use the same order as in the WindowAttr() function.
static char *WindowAttrs[] = {
- "buffer", "cursor", "height", "vars", "options", "number", "row", "col",
- "tabpage", "valid",
+ "buffer",
+ "cursor",
+ "height",
+ "row",
+ "width",
+ "col",
+ "vars",
+ "options",
+ "number",
+ "tabpage",
+ "valid",
NULL
};
diff --git a/src/testdir/test86.ok b/src/testdir/test86.ok
index 58e776a6d..f8d4ceb57 100644
--- a/src/testdir/test86.ok
+++ b/src/testdir/test86.ok
@@ -443,7 +443,7 @@ vim.current.window:Window:True
vim.current.tabpage:TabPage:True
current:__dir__,__members__,buffer,line,range,tabpage,window
buffer:__dir__,__members__,append,mark,name,number,options,range,valid,vars
-window:__dir__,__members__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars
+window:__dir__,__members__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars,width
tabpage:__dir__,__members__,number,valid,vars,window,windows
range:__dir__,__members__,append,end,start
dictionary:__dir__,__members__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
diff --git a/src/testdir/test87.ok b/src/testdir/test87.ok
index 72b59b631..9ca4b624c 100644
--- a/src/testdir/test87.ok
+++ b/src/testdir/test87.ok
@@ -443,7 +443,7 @@ vim.current.window:Window:True
vim.current.tabpage:TabPage:True
current:__dir__,buffer,line,range,tabpage,window
buffer:__dir__,append,mark,name,number,options,range,valid,vars
-window:__dir__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars
+window:__dir__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars,width
tabpage:__dir__,number,valid,vars,window,windows
range:__dir__,append,end,start
dictionary:__dir__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
diff --git a/src/version.c b/src/version.c
index 88c1fb110..71283ed0d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 41,
+/**/
40,
/**/
39,