Re: Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)

2023-08-15 Fir de Conversatie Christian Brabandt


On Mo, 14 Aug 2023, Adri Verhoef wrote:

> > Op 13-08-2023 10:45 CEST schreef Christian Brabandt :
> [..]
> > diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
> [..]
> > @@ -216,7 +217,7 @@ Vim would never have become what it is now, without the 
> > help of these people!
> > Bill Foster Athena GUI port (later removed)
> > Google  Lets me work on Vim one day a week
> 
> I noticed this: "Lets me work".  Bram worked for Google for 15 years, until 
> September 2021.
> Shouldn't this "Lets me" be past tense then, like "Let Bram"?  Alternatively: 
> "Letting Bram".

Fixed in https://github.com/vim/vim/pull/12790

> 
> > diff --git a/LICENSE b/LICENSE
> [..]
> > @@ -21,8 +21,8 @@ II) It is allowed to distribute a modified (or extended) 
> > version of Vim,
> >maintainer will do with your changes and under what license they
> >will be distributed is negotiable.  If there has been no 
> > negotiation
> >then this license, or a later version, also applies to your 
> > changes.
> > -  The current maintainer is Bram Moolenaar .  If this
> > -  changes it will be announced in appropriate places (most likely
> > +  The current maintainers are listed here: 
> > https://github.com/orgs/vim/people.
> > +  If this changes it will be announced in appropriate places (most 
> > likely
> >vim.sf.net, www.vim.org and/or comp.editors). When it is 
> > completely
> >impossible to contact the maintainer, the obligation to send him
> >your changes ceases.  Once the maintainer has confirmed that he 
> > has
> 
> Above it says: "The current maintainers are listed".
> 
> As we can see, that's plural.  Let's watch out for the word "maintainer" then.
> 
> Let's also have another look at the lines above.
> 
> "It is allowed to distribute a modified (or extended) version of Vim",
> that's singular ("version of Vim").  Then the next lines: "maintainer will do
> with your changes and under what license they will be distributed is 
> negotiable".
> I think this can be split into two parts: the part where the changes are 
> mentioned
> and the part where the license of the version is discussed.  'The changes'
> might be plural, but 'the version' is singular.  So shouldn't this be "the
> maintainers will do with your changes and under what license that version"
> (trying to avoid the word 'it' or 'they' after "under what license") then?
> 
> Possibly, the following lines:
> 
> "impossible to contact the maintainer, the obligation to send him
> your changes ceases.  Once the maintainer has confirmed that he has"
> 
> should then be changed into:
> 
> "impossible to contact the maintainers, the obligation to send them
> your changes ceases.  Once the maintainers have confirmed that they have"
> 
> There are more locations where "maintainer" is mentioned.  Should I list them?
> 
> The same text appears in file uganda.txt:

Yes, uganda.txt is basically a copy of the license files. I am a bit 
hesitant to change this, as I don't want to change the license more than 
necessary. https://github.com/vim/vim/pull/12749#issuecomment-1678066341

> 
> > diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt
> [..]
> > @@ -46,8 +46,8 @@ II) It is allowed to distribute a modified (or extended) 
> > version of Vim,
> >   maintainer will do with your changes and under what license they
> >   will be distributed is negotiable.  If there has been no negotiation
> >   then this license, or a later version, also applies to your changes.
> > - The current maintainer is Bram Moolenaar .  If this
> > - changes it will be announced in appropriate places (most likely
> > + The current maintainers are listed here: 
> > https://github.com/orgs/vim/people.
> > + If this changes it will be announced in appropriate places (most 
> > likely
> >   vim.sf.net, www.vim.org and/or comp.editors).  When it is completely
> >   impossible to contact the maintainer, the obligation to send him
> >   your changes ceases.  Once the maintainer has confirmed that he has
> 
> So the same remarks apply. :-)
> 
> This wasn't changed yet:
> 
> > diff --git a/runtime/indent/README.txt b/runtime/indent/README.txt
> [..]
> >  If you have remarks about an existing file, send them to the maintainer of
> >  that file.  Only when you get no response send a message to b...@vim.org.

fixed in 
https://github.com/vim/vim/commit/96d6c4aabed15266bc4acfa66f9b35c2820dfa59

> 
> That should possibly be changed into:
> "get no response send a message to the vim-dev mailing list 
> ."
> 
> The word "me" is also 'suspect':
> 
> > diff --git a/runtime/syntax/model.vim b/runtime/syntax/model.vim
> [..]
> > -" Maintainer:  Bram Moolenaar 
> > -" Last Change: 2005 Jun 20
> > +" Maintainer:  The Vim Project 
> > +" Last Change: 2023 Aug 10
> > +" Former Maintainer:   Bram M

zh_CN: update to use reordering (#12787)

2023-08-15 Fir de Conversatie Christian Brabandt
zh_CN: update to use reordering (#12787)

Commit: 
https://github.com/vim/vim/commit/cf8cde2e5a3bee4f33e39e354945bab367f5eb7c
Author: 依云 
Date:   Wed Aug 16 05:22:48 2023 +0800

zh_CN: update to use reordering (https://github.com/vim/vim/issues/12787)

diff --git a/src/po/zh_CN.UTF-8.po b/src/po/zh_CN.UTF-8.po
index 6e4fa8f93..e6041883a 100644
--- a/src/po/zh_CN.UTF-8.po
+++ b/src/po/zh_CN.UTF-8.po
@@ -514,22 +514,22 @@ msgstr "(已中断) "
 #, c-format
 msgid "%ld match on %ld line"
 msgid_plural "%ld matches on %ld line"
-msgstr[0] "%ld 个匹配(%ld 行)"
+msgstr[0] "%2$ld 行 %1$ld 个匹配"
 
 #, c-format
 msgid "%ld substitution on %ld line"
 msgid_plural "%ld substitutions on %ld line"
-msgstr[0] "%ld 次替换(%ld 行)"
+msgstr[0] "%2$ld 行 %1$ld 次替换"
 
 #, c-format
 msgid "%ld match on %ld lines"
 msgid_plural "%ld matches on %ld lines"
-msgstr[0] "%ld 个匹配(%ld 行)"
+msgstr[0] "%2$ld 行 %1$ld 个匹配"
 
 #, c-format
 msgid "%ld substitution on %ld lines"
 msgid_plural "%ld substitutions on %ld lines"
-msgstr[0] "%ld 次替换(%ld 行)"
+msgstr[0] "%2$ld 行 %1$ld 次替换"
 
 #, c-format
 msgid "Pattern found in every line: %s"
@@ -1676,8 +1676,8 @@ msgstr "--servername <名称>\t发送到或成为 Vim 服务器 <名称>"
 msgid "--startuptime \tWrite startup timing messages to "
 msgstr "--startuptime <文件>\t将启动计时信息写入 <文件>"
 
-msgid "--log \t\tStart logging to  early"
-msgstr "--log <文件>\t\t尽早开始记录日志到 <文件>"
+msgid "--log \tStart logging to  early"
+msgstr "--log <文件>\t尽早开始记录日志到 <文件>"
 
 msgid "-i \t\tUse  instead of .viminfo"
 msgstr "-i \t\t使用  取代 .viminfo"
@@ -2416,15 +2416,13 @@ msgstr ""
 "\n"
 "无法设置安全上下文:"
 
-# reorder if possible
 #, c-format
 msgid "Could not set security context %s for %s"
-msgstr "无法设置安全上下文 %s:%s"
+msgstr "无法为 %2$s 设置安全上下文 %1$s"
 
-# reorder if possible
 #, c-format
 msgid "Could not get security context %s for %s. Removing it!"
-msgstr "无法设置安全上下文 %s:%s。删掉它!"
+msgstr "无法为 %2$s 获取安全上下文 %1$s。删之!"
 
 msgid ""
 "\n"
@@ -2563,19 +2561,17 @@ msgstr "无法打开用于写入的临时日志文件,显示在标准错误上
 
 #, c-format
 msgid " into \"%c"
-msgstr "进 \"%c "
+msgstr "进 \"%c"
 
-# reorder if possible
 #, c-format
 msgid "block of %ld line yanked%s"
 msgid_plural "block of %ld lines yanked%s"
-msgstr[0] "%ld 行的块复制%s了"
+msgstr[0] "%ld 行的块已复制%s"
 
-# reorder if possible
 #, c-format
 msgid "%ld line yanked%s"
 msgid_plural "%ld lines yanked%s"
-msgstr[0] "%ld 行复制%s了"
+msgstr[0] "%ld 行已复制%s"
 
 msgid ""
 "\n"
@@ -3023,18 +3019,16 @@ msgstr "写入拼写文件 %s ……"
 msgid "Done!"
 msgstr "完成!"
 
-# reorder if possible
 #, c-format
 msgid "Word '%.*s' removed from %s"
-msgstr "单词 '%.*s' 从 %s 中删除了"
+msgstr "从 %3$s 中删除了单词 '%1$.*2s'"
 
 msgid "Seek error in spellfile"
 msgstr "拼写文件中定位错误"
 
-# reorder if possible
 #, c-format
 msgid "Word '%.*s' added to %s"
-msgstr "单词 '%.*s' 添加到了 %s"
+msgstr "向 %3$s 中添加了单词 '%1$.*2s'"
 
 msgid "Sorry, no suggestions"
 msgstr "抱歉,没有建议"
@@ -4597,10 +4591,9 @@ msgstr "E242: 在关闭窗口时不能分割另一个窗口"
 msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
 msgstr "E243: 不支持的参数: \"-%s\";请使用 OLE 版本。"
 
-# reorder if possible
-#, fuzzy, c-format
-# msgid "E244: Illegal %s name \"%s\" in font name \"%s\""
-# msgstr "E244: 字体名 \"%3$s\" 中有非法 %1$s 名称 \"%2$s\""
+#, c-format
+msgid "E244: Illegal %s name \"%s\" in font name \"%s\""
+msgstr "E244: 字体名 \"%3$s\" 中有非法 %1$s 名称 \"%2$s\""
 
 #, c-format
 msgid "E245: Illegal char '%c' in font name \"%s\""
@@ -4836,10 +4829,9 @@ msgstr "E314: 保留失败"
 msgid "E315: ml_get: Invalid lnum: %ld"
 msgstr "E315: ml_get: 无效的 lnum: %ld"
 
-# reorder if possible
-#, fuzzy, c-format
-# msgid "E316: ml_get: Cannot find line %ld in buffer %d %s"
-# msgstr "E316: ml_get: 在缓冲区 %2$d %3$s 中找不到第 %1$ld 行"
+#, c-format
+msgid "E316: ml_get: Cannot find line %ld in buffer %d %s"
+msgstr "E316: ml_get: 在缓冲区 %2$d %3$s 中找不到第 %1$ld 行"
 
 msgid "E317: Pointer block id wrong"
 msgstr "E317: 指针块 id 错误"
@@ -6428,7 +6420,7 @@ msgstr "E804: 不能对浮点数使用 '%'"
 msgid "E805: Using a Float as a Number"
 msgstr "E805: 将浮点数作整数使用"
 
-msgid "E806: Using a Float as a String"
+msgid "E806: Using Float as a String"
 msgstr "E806: 将浮点数作字符串使用"
 
 msgid "E807: Expected Float argument for printf()"
@@ -7246,10 +7238,9 @@ msgstr "E1035: % 需要整数参数"
 msgid "E1036: %c requires number or float arguments"
 msgstr "E1036: %c 需要整数或者浮点数参数"
 
-# reorder if possible
-#, fuzzy, c-format
-# msgid "E1037: Cannot use \"%s\" with %s"
-# msgstr "E1037: 不能对 %2$s 使用 \"%1$s\""
+#, c-format
+msgid "E1037: Cannot use \"%s\" with %s"
+msgstr "E1037: 不能对 %2$s 使用 \"%1$s\""
 
 msgid "E1038: \"vim9script\" can only be used in a script"
 msgstr "E1038: \"vim9script\" 只能在脚本中使用"
@@ -7511,8 +7502,8 @@ msgstr "E1112: 列表项 %d 单元格宽度无效"
 msgid "E1113: Overlapping ranges for 0x%lx"
 msgstr "E1113: 重叠范围为 0x%lx"
 
-msgid "E1114: Only values of 0x80 and higher supported"
-msgstr "E1114: 只支持 0x80 或更高的值"
+msgid "E1114: Only values of 0x100 and higher supported"
+msgstr "E1114: 只支持 0x100 或更高的值"
 
 msgid "E1115: \"assert_fails()\" fourth argument must be a number"
 msgstr "E1115: \"assert_fails()\" 第四个参数必须是一个整数"
@@ -7676,10 +7667,

patch 9.0.1719: if_lua: crash for for Lua functions invoked via Vim callbacks

2023-08-15 Fir de Conversatie Christian Brabandt
patch 9.0.1719: if_lua: crash for for Lua functions invoked via Vim callbacks

Commit: 
https://github.com/vim/vim/commit/8a35033782de4e1f43fba15543fc8fb458944194
Author: Jesse Pavel 
Date:   Sun Aug 13 22:05:45 2023 -0400

patch 9.0.1719: if_lua: crash for for Lua functions invoked via Vim 
callbacks

Problem: if_lua: crash for Lua functions invoked via Vim callbacks
Solution: Use Lua registry rather than upvalues for udata cache

closes: #12785

Signed-off-by: Christian Brabandt 
Co-authored-by: Jesse Pavel 

diff --git a/src/if_lua.c b/src/if_lua.c
index 0af041aaa..1eda2bf26 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -16,6 +16,12 @@
 #include 
 #include 
 
+#if __STDC_VERSION__ >= 199901L
+#  define LUAV_INLINE inline
+#else
+#  define LUAV_INLINE
+#endif
+
 // Only do the following when the feature is enabled.  Needed for "make
 // depend".
 #if defined(FEAT_LUA) || defined(PROTO)
@@ -61,16 +67,33 @@ static const char LUAVIM_SETREF[] = "luaV_setref";
 
 static const char LUA___CALL[] = "__call";
 
-// most functions are closures with a cache table as first upvalue;
-// get/setudata manage references to vim userdata in cache table through
-// object pointers (light userdata)
-#define luaV_getudata(L, v) \
-lua_pushlightuserdata((L), (void *) (v)); \
-lua_rawget((L), lua_upvalueindex(1))
-#define luaV_setudata(L, v) \
-lua_pushlightuserdata((L), (void *) (v)); \
-lua_pushvalue((L), -2); \
-lua_rawset((L), lua_upvalueindex(1))
+// get/setudata manage references to vim userdata in a cache table through
+// object pointers (light userdata). The cache table itself is retrieved
+// from the registry.
+
+static const char LUAVIM_UDATA_CACHE[] = "luaV_udata_cache";
+
+static void LUAV_INLINE
+luaV_getudata(lua_State *L, void *v)
+{
+lua_pushlightuserdata(L, (void *) LUAVIM_UDATA_CACHE);
+lua_rawget(L, LUA_REGISTRYINDEX);  // now the cache table is at the top of 
the stack
+lua_pushlightuserdata(L, v);
+lua_rawget(L, -2);
+lua_remove(L, -2);  // remove the cache table from the stack
+}
+
+static void LUAV_INLINE
+luaV_setudata(lua_State *L, void *v)
+{
+lua_pushlightuserdata(L, (void *) LUAVIM_UDATA_CACHE);
+lua_rawget(L, LUA_REGISTRYINDEX);  // cache table is at -1
+lua_pushlightuserdata(L, v);   // ...now at -2
+lua_pushvalue(L, -3); // copy the userdata (cache at -3)
+lua_rawset(L, -3);// consumes two stack items
+lua_pop(L, 1);// and remove the cache table
+}
+
 #define luaV_getfield(L, s) \
 lua_pushlightuserdata((L), (void *)(s)); \
 lua_rawget((L), LUA_REGISTRYINDEX)
@@ -92,10 +115,10 @@ static int luaV_call_lua_func(int argcount, typval_T 
*argvars, typval_T *rettv,
 static void luaV_call_lua_func_free(void *state);
 
 #if LUA_VERSION_NUM <= 501
-#define luaV_openlib(L, l, n) luaL_openlib(L, NULL, l, n)
+#define luaV_register(L, l) luaL_register(L, NULL, l)
 #define luaL_typeerror luaL_typerror
 #else
-#define luaV_openlib luaL_setfuncs
+#define luaV_register(L, l) luaL_setfuncs(L, l, 0)
 #endif
 
 #ifdef DYNAMIC_LUA
@@ -879,11 +902,11 @@ luaV_list_len(lua_State *L)
 static int
 luaV_list_iter(lua_State *L)
 {
-listitem_T *li = (listitem_T *) lua_touserdata(L, lua_upvalueindex(2));
+listitem_T *li = (listitem_T *) lua_touserdata(L, lua_upvalueindex(1));
 if (li == NULL) return 0;
 luaV_pushtypval(L, &li->li_tv);
 lua_pushlightuserdata(L, (void *) li->li_next);
-lua_replace(L, lua_upvalueindex(2));
+lua_replace(L, lua_upvalueindex(1));
 return 1;
 }
 
@@ -891,9 +914,8 @@ luaV_list_iter(lua_State *L)
 luaV_list_call(lua_State *L)
 {
 list_T *l = luaV_unbox(L, luaV_List, 1);
-lua_pushvalue(L, lua_upvalueindex(1)); // pass cache table along
 lua_pushlightuserdata(L, (void *) l->lv_first);
-lua_pushcclosure(L, luaV_list_iter, 2);
+lua_pushcclosure(L, luaV_list_iter, 1);
 return 1;
 }
 
@@ -1057,8 +1079,8 @@ luaV_dict_len(lua_State *L)
 luaV_dict_iter(lua_State *L UNUSED)
 {
 #ifdef FEAT_EVAL
-hashitem_T *hi = (hashitem_T *) lua_touserdata(L, lua_upvalueindex(2));
-int n = lua_tointeger(L, lua_upvalueindex(3));
+hashitem_T *hi = (hashitem_T *) lua_touserdata(L, lua_upvalueindex(1));
+int n = lua_tointeger(L, lua_upvalueindex(2));
 dictitem_T *di;
 if (n <= 0) return 0;
 while (HASHITEM_EMPTY(hi)) hi++;
@@ -1066,9 +1088,9 @@ luaV_dict_iter(lua_State *L UNUSED)
 lua_pushstring(L, (char *) hi->hi_key);
 luaV_pushtypval(L, &di->di_tv);
 lua_pushlightuserdata(L, (void *) (hi + 1));
-lua_replace(L, lua_upvalueindex(2));
+lua_replace(L, lua_upvalueindex(1));
 lua_pushinteger(L, n - 1);
-lua_replace(L, lua_upvalueindex(3));
+lua_replace(L, lua_upvalueindex(2));
 return 2;
 #else
 return 0;
@@ -1080,10 +1102,9 @@ luaV_dict_call(lua_State *L)
 {
 dict_T *d = luaV_unbox(L, luaV_Dict, 1);
 hashtab_T *ht = &d->dv_hashta

Update FreeBASIC syntax file (#12781)

2023-08-15 Fir de Conversatie Christian Brabandt
Update FreeBASIC syntax file (#12781)

Commit: 
https://github.com/vim/vim/commit/20b33b56ad5d92c1c11e0859dc9333166625e0ad
Author: dkearns 
Date:   Wed Aug 16 07:23:40 2023 +1000

Update FreeBASIC syntax file (https://github.com/vim/vim/issues/12781)

diff --git a/runtime/syntax/freebasic.vim b/runtime/syntax/freebasic.vim
index 7549d0255..5c43289c1 100644
--- a/runtime/syntax/freebasic.vim
+++ b/runtime/syntax/freebasic.vim
@@ -2,7 +2,7 @@
 " Language:FreeBASIC
 " Maintainer:  Doug Kearns 
 " Previous Maintainer: Mark Manning 
-" Last Change: 2022 Jun 26
+" Last Change: 2023 Aug 14
 "
 " Description:
 "
@@ -338,13 +338,13 @@ syn keyword   freebasicPredefined 
__FB_64BIT__ __FB_ARGC__ __FB_ARG_COUNT__ __FB_
 syn keywordfreebasicPredefined __FB_ARG_RIGHTOF__ __FB_ARGV__ 
__FB_ARM__ __FB_ASM__ __FB_BACKEND__
 syn keywordfreebasicPredefined __FB_BIGENDIAN__ 
__FB_BUILD_DATE__ __FB_BUILD_DATE_ISO__ __FB_BUILD_SHA1__
 syn keywordfreebasicPredefined __FB_CYGWIN__ __FB_DARWIN__ 
__FB_DEBUG__ __FB_DOS__ __FB_ERR__ __FB_EVAL__
-syn keywordfreebasicPredefined __FB_FPMODE__ __FB_FPU__ 
__FB_FREEBSD__ __FB_GCC__ __FB_GUI__ __FB_JOIN__
+syn keywordfreebasicPredefined __FB_FPMODE__ __FB_FPU__ 
__FB_FREEBSD__ __FB_GCC__ __FB_GUI__ __FB_IIF__ __FB_JOIN__
 syn keywordfreebasicPredefined __FB_LANG__ __FB_LINUX__ 
__FB_MAIN__ __FB_MIN_VERSION__ __FB_MT__ __FB_NETBSD__
 syn keywordfreebasicPredefined __FB_OPENBSD__ __FB_OPTIMIZE__ 
__FB_OPTION_BYVAL__ __FB_OPTION_DYNAMIC__
 syn keywordfreebasicPredefined __FB_OPTION_ESCAPE__ 
__FB_OPTION_EXPLICIT__ __FB_OPTION_GOSUB__
 syn keywordfreebasicPredefined __FB_OPTION_PRIVATE__ 
__FB_OUT_DLL__ __FB_OUT_EXE__ __FB_OUT_LIB__ __FB_OUT_OBJ__
-syn keywordfreebasicPredefined __FB_PCOS__ __FB_PPC__ 
__FB_QUOTE__ __FB_SIGNATURE__ __FB_SSE__ __FB_UNIQUEID__
-syn keywordfreebasicPredefined __FB_UNIQUEID_POP__ 
__FB_UNIQUEID_PUSH__ __FB_UNIX__ __FB_UNQUOTE__
+syn keywordfreebasicPredefined __FB_PCOS__ __FB_PPC__ 
__FB_QUERY_SYMBOL__ __FB_QUOTE__ __FB_SIGNATURE__ __FB_SSE__
+syn keywordfreebasicPredefined __FB_UNIQUEID__ 
__FB_UNIQUEID_POP__ __FB_UNIQUEID_PUSH__ __FB_UNIX__ __FB_UNQUOTE__
 syn keywordfreebasicPredefined __FB_VECTORIZE__ 
__FB_VER_MAJOR__ __FB_VER_MINOR__ __FB_VER_PATCH__ __FB_VERSION__
 syn keywordfreebasicPredefined __FB_WIN32__ __FB_X86__ 
__FB_XBOX__
 syn keywordfreebasicPredefined __FILE__ __FILE_NQ__ 
__FUNCTION__ __FUNCTION_NQ__

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW1c5-003dKX-CR%40256bit.org.


patch 9.0.1718: dict-completion does not respect region

2023-08-15 Fir de Conversatie Christian Brabandt
patch 9.0.1718: dict-completion does not respect region

Commit: 
https://github.com/vim/vim/commit/e98fb643ec5f84f9088c8b1434a0bd6ff988dc2d
Author: LemonBoy 
Date:   Tue Aug 15 23:07:55 2023 +0200

patch 9.0.1718: dict-completion does not respect region

Problem: dict-completion does not respect region
Solution: respect selected region in dict completion

Set do_region to zero as we don't want a complete dump of the matching
words, we want the code to filter them according to the user's selected
region.

closes: #12792
closes: #7025

Signed-off-by: Christian Brabandt 
Co-authored-by: LemonBoy 

diff --git a/src/spell.c b/src/spell.c
index ef06ab3e0..1f4c60ed8 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -3942,13 +3942,10 @@ spell_dump_compl(
}
 }
 
-if (do_region && region_names != NULL)
+if (do_region && region_names != NULL && pat == NULL)
 {
-   if (pat == NULL)
-   {
-   vim_snprintf((char *)IObuff, IOSIZE, "/regions=%s", region_names);
-   ml_append(lnum++, IObuff, (colnr_T)0, FALSE);
-   }
+   vim_snprintf((char *)IObuff, IOSIZE, "/regions=%s", region_names);
+   ml_append(lnum++, IObuff, (colnr_T)0, FALSE);
 }
 else
do_region = FALSE;
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 3f7b028bc..9eecb1e3f 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -274,8 +274,7 @@ func Test_compl_with_CTRL_X_CTRL_K_using_spell()
   call assert_equal(['theater'], getline(1, '$'))
   set spelllang=en_gb
   call feedkeys("Stheat\\\", 'tnx')
-  " FIXME: commented out, expected theatre bug got theater. See issue #7025.
-  " call assert_equal(['theatre'], getline(1, '$'))
+  call assert_equal(['theatre'], getline(1, '$'))
 
   bwipe!
   set spell& spelllang& dictionary& ignorecase&
diff --git a/src/version.c b/src/version.c
index d5d18556a..a1cda69cb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+1718,
 /**/
 1717,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW1Na-003c9p-TN%40256bit.org.


The keyboard layout "russian-typograph" has been updated to version 3.3 (#12796)

2023-08-15 Fir de Conversatie Christian Brabandt
The keyboard layout "russian-typograph" has been updated to version 3.3 (#12796)

Commit: 
https://github.com/vim/vim/commit/636d32b327309f453e5cdfe75bbe7ad14550093a
Author: Restorer <69863286+restor...@users.noreply.github.com>
Date:   Tue Aug 15 21:06:18 2023 +

The keyboard layout "russian-typograph" has been updated to version 3.3 
(https://github.com/vim/vim/issues/12796)

Co-authored-by: RestorerZ 

diff --git a/runtime/keymap/russian-typograph.vim 
b/runtime/keymap/russian-typograph.vim
index e0fbf2288..7c5aed608 100644
--- a/runtime/keymap/russian-typograph.vim
+++ b/runtime/keymap/russian-typograph.vim
@@ -1,54 +1,140 @@
 " Vim Keymap file for Russian characters
-" layout English-US standard 104 key 'QWERTY', 'JCUKEN'
+" layout English-US 104 key 'QWERTY'
 "
-" Maintainer:  Restorer 
-" Last Changed: 20 Jan 2019
-" Description:  Раскладка сделана на основе раскладки «русская машинопись»
-" (KBDRU1.DLL), поставляемой в составе ОС MS Windows. Эта раскладка позволяет
-" печать практически все знаки препинания используя цифровой ряд и не требуя 
при
-" этом нажатия дополнительных клавиш, ну и также удобное расположение буквы 
«Ё».
-" Однако были внесены некоторые дополнения (улучшения?), в частности:
-" ‐ раздельные символы круглых скобок (), расположены на тех же позициях, что и
-" в US-International;
-" ‐ раздельные символы типографских кавычек «», расположены на клавишах «3» и
-" «4» соответственно;
-" ‐ на этих же клавишах находятся внутренние кавычки “лапки”, набираемые при
-" нажатой клавише «ALT»;
-" ‐ возможность набирать символы, отсутствующие в русской раскладке клавиатуры,
-" а именно @#$^&*{}[]"'`~<>, которые расположены на тех же местах, что и 
раньше.
-" Для этого не требуется переключаться в латинскую раскладку клавиатуры, а
-" оставаясь в русской, использовать для этого дополнительные клавиши «SHIFT» и
-" «ALT»;
-" ‐ и ещё несколько удобств, которые позволяют быстро и с минимальными усилиями
-" набирать текст.
-
-scriptencoding utf-8
-
-" Переключение языка ввода со стандартного сочетания  на указанные ниже
-" Для режимов вставки и замены
-""или SHIFT+SPACE
-"inoremap  
-""или CTRL+SPACE"
-"inoremap  
-" Для режима командной строки
-""или SHIFT+SPACE
-"cnoremap  
-""или CTRL+SPACE"
-"cnoremap  
-" Одной командой для режимов вставки, замены и командной строки
-"noremap!  
-"noremap!  
+" Maintainer:   Restorer 
+" Last Changed: 25 Apr 2023
+" Version:  3.3
+" Description:  описание дано после изображений клавиатуры
+
+" Расположение символов для русского языка при подключенном файле с раскладкой
+" клавиатуры «русская типографская» (russian-typograph.vim). Версия 3.3
+
+
+"Ни одна из клавиш модификаторов не нажата
+
+",---,---,---,---,---,---,---,---,---,---,---,---,---,---,
+"| % | ! | — | « | » | : | , | . | ? | ( | ) | ‐ | ; | <---  |
+"|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-|
+"| ->| | й | ц | у | к | е | н | г | ш | щ | з | х | ъ |  /  |
+"|-',--',--',--',--',--',--',--',--',--',--',--',--'-|
+"| Caps | ф | ы | в | а | п | р | о | л | д | ж | э |  Enter |
+"|--'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'|
+"| Shift  | я | ч | с | м | и | т | ь | б | ю | ё |  Shift   |
+"|--,-',--'--,'---'---'---'---'---'---'-,-'---',--,--|
+"| Ctrl |  | Alt |  | Alt  |  | Ctrl |
+"'--'  '-'--'--'  '--'
+
+
+"  Нажата клавиша SHIFT
+
+",---,---,---,---,---,---,---,---,---,---,---,---,---,---,
+"| = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | <---  |
+"|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-|
+"| ->| | Й | Ц | У | К | Е | Н | Г | Ш | Щ | З | Х | Ъ |  §  |
+"|-',--',--',--',--',--',--',--',--',--',--',--',--'-|
+"| Caps | Ф | Ы | В | А | П | Р | О | Л | Д | Ж | Э |  Enter |
+"|--'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'|
+"| SHIFT  | Я | Ч | С | М | И | Т | Ь | Б | Ю | Ё |   SHIFT  |
+"|--,-',--'--,'---'---'---'---'---'---'-,-'---',--,--|
+"| Ctrl |  | Alt |  | Alt  |  | Ctrl |
+"'--'  '-'--'--'  '--'
+
+
+"   Нажата клавиша ALT
+
+",---,---,---,---,---,---,---,---,---,---,---,---,---,---,
+"| ` | № | – | „ | “ |   |   | … |   |   |   | ‑ | ± | <---  |
+"|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-|
+"| ->| |   |   |   |   |   |   |   |   |   |   | [ | ] |  \  |
+"|-',--',--',--',--',--',--',--',--',--',--',--',--'-|
+"| Caps |   |   |   |   |   | ₽ |   |   |   |   | ' |  Enter |
+"|--'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'|
+"| Shift  |   |  

Update syntax/fortran.vim (#12798)

2023-08-15 Fir de Conversatie Christian Brabandt
Update syntax/fortran.vim (#12798)

Commit: 
https://github.com/vim/vim/commit/4868f637b84a18fd162db6eff6d716bf22595fd0
Author: Ajit-Thakkar <142174202+ajit-thak...@users.noreply.github.com>
Date:   Tue Aug 15 18:05:00 2023 -0300

Update syntax/fortran.vim (https://github.com/vim/vim/issues/12798)

Several small improvements including better discrimination of "real" used 
as a type and as an intrinsic

diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim
index b5c9b1ef8..fc6c82b48 100644
--- a/runtime/syntax/fortran.vim
+++ b/runtime/syntax/fortran.vim
@@ -1,6 +1,6 @@
 " Vim syntax file
 " Language:Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
-" Version: (v104) 2021 April 06
+" Version: (v105) 2023 August 14
 " Maintainer:  Ajit J. Thakkar ; 
 " Usage:   For instructions, do :help fortran-syntax from Vim
 " Credits:
@@ -11,7 +11,7 @@
 "  Walter Dieudonne, Alexander Wagner, Roman Bertle, Charles Rendleman,
 "  Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
 "  Stefano Zaghi, Vishnu V. Krishnan, Judicael Grasset, Takuma Yoshida,
-"  Eisuke Kawashima, Andre Chalella, and Fritz Reese.
+"  Eisuke Kawashima, Andre Chalella, Fritz Reese, and Karl D. Hammond.
 
 if exists("b:current_syntax")
   finish
@@ -95,16 +95,14 @@ if exists("fortran_more_precise")
   syn match fortranConstructName "\(\"
-syn match fortranType  "\"
-syn match fortranType  "\"
-syn match fortranType  "\"
-syn match fortranType  "\"
-syn match fortranType  "\"
+syn match fortranType  "\"
+syn match fortranType  "\"
 syn keyword fortranTypeintrinsic
-syn match fortranType  "\"
+syn match fortranType  "\\s\+\(none\)\?"
 syn keyword fortranStructure   dimension
 syn keyword fortranStorageClassparameter save
 syn match fortranUnitHeader"\"
@@ -131,7 +129,8 @@ syn match fortranTypeOb "\"
-syn match fortranType   "\"
+syn match fortranType   "\\(\s\+is\>\)\?"
+syn match fortranType  "^\s*\(type\s\+\(is\)\? 
\)\?\s*\(real\|integer\|logical\|complex\|character\)\>"
+syn match fortranType   "^\s*\(implicit 
\)\?\s*\(real\|integer\|logical\|complex\|character\)\>"
 
 "Numbers of various sorts
 " Integers
@@ -206,9 +206,6 @@ syn region fortranStringR   start=+'+ end=+'+ 
contains=fortranContinueMark,fortran
 syn keyword fortranIntrinsicR  dim lge lgt lle llt mod
 syn keyword fortranKeywordDel  assign pause
 
-syn match fortranType   "\"
-syn keyword fortranTypenone
-
 syn keyword fortranStructure   private public intent optional
 syn keyword fortranStructure   pointer target allocatable
 syn keyword fortranStorageClassin out
@@ -222,7 +219,8 @@ syn keyword fortranUnitHeader   result operator 
assignment
 syn match fortranUnitHeader"\"
 syn keyword fortranKeyword allocate deallocate nullify cycle exit
 syn match fortranConditional   "\"
-syn keyword fortranConditional case default where elsewhere
+syn match fortranConditional   "\"
+syn keyword fortranConditional where elsewhere
 
 syn match fortranOperator  "\(\(>\|<\)=\=\|==\|/=\|=\)"
 syn match fortranOperator  "=>"
@@ -231,8 +229,7 @@ syn region fortranStringstart=+"+ end=+"+   
contains=fortranLeftMargin,fortranCon
 syn keyword fortranIO  pad position action delim readwrite
 syn keyword fortranIO  eor advance nml
 
-syn keyword fortranIntrinsic   adjustl adjustr all allocated any associated 
bit_size btest ceiling count cshift date_and_time digits dot_product eoshift 
epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft 
ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent 
minloc minval modulo mvbits nearest pack precision present product radix 
random_number random_seed range repeat reshape rrspacing
-syn keyword fortranIntrinsic   scale scan selected_int_kind selected_real_kind 
set_exponent shape size spacing spread sum system_clock tiny transpose trim 
ubound unpack verify
+syn match fortranIntrinsic 
'\<\(adjustl\|adjustr\|all\|allocated\|any\|associated\|bit_size\|btest\|ceiling\|count\|cshift\|date_and_time\|digits\|dot_product\|eoshift\|epsilon\|exponent\|floor\|fraction\|huge\|iand\|ibclr\|ibits\|ibset\|ieor\|ior\|ishft\|ishftc\|lbound\|len_trim\|matmul\|maxexponent\|maxloc\|maxval\|merge\|minexponent\|minloc\|minval\|modulo\|mvbits\|nearest\|pack\|precision\|present\|product\|radix\|random_number\|random_seed\|range\|repeat\|reshape\|rrspacing\|scale\|scan\|selected_int_kind\|selected_real_kind\|set_exponent\|shape\|size\|spacing\|spread\|sum\|system_clock\|tiny\|transpose\|trim\|ubound\|unpack\|verify\)\>\ze\s*('
 syn match fortranIntrinsic "\\(\s*\.\)\@!"me=s+3
 syn match fortranIntrinsic "\\s*[(,]"me=s+4
 
@@ -306,9 +303,9 @@ if b:fortran_dialect == "f08"
   syn match fortranType   "\"
+  syn match

patch 9.0.1717: virtcol2col returns last byte of a multi-byte char

2023-08-15 Fir de Conversatie Christian Brabandt
patch 9.0.1717: virtcol2col returns last byte of a multi-byte char

Commit: 
https://github.com/vim/vim/commit/b209b86e6636a16088ccacdac98213416c065bf2
Author: Yegappan Lakshmanan 
Date:   Tue Aug 15 23:01:44 2023 +0200

patch 9.0.1717: virtcol2col returns last byte of a multi-byte char

Problem: virtcol2col returns last byte of a multi-byte char
Solution: Make it return the first byte for a multi-byte char

closes: #12786
closes: #12799

Signed-off-by: Christian Brabandt 
Co-authored-by: Yegappan Lakshmanan 

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 96db898b0..2f6961d7d 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -10347,6 +10347,9 @@ virtcol2col({winid}, {lnum}, {col}) 
*virtcol2col()*
{lnum}, then the byte index of the character at the last
virtual column is returned.
 
+   For a multi-byte character, the column number of the first
+   byte in the character is returned.
+
The {winid} argument can be the window number or the
|window-ID|. If this is zero, then the current window is used.
 
diff --git a/src/move.c b/src/move.c
index 22c37ce28..94dc7dc63 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1556,6 +1556,25 @@ f_screenpos(typval_T *argvars UNUSED, typval_T *rettv)
 dict_add_number(dict, "endcol", ecol);
 }
 
+/*
+ * Convert a virtual (screen) column to a character column.  The first column
+ * is one.  For a multibyte character, the column number of the first byte is
+ * returned.
+ */
+static int
+virtcol2col(win_T *wp, linenr_T lnum, int vcol)
+{
+intoffset = vcol2col(wp, lnum, vcol);
+char_u *line = ml_get_buf(wp->w_buffer, lnum, FALSE);
+char_u *p = line + offset;
+
+// For a multibyte character, need to return the column number of the first
+// byte.
+MB_PTR_BACK(line, p);
+
+return (int)(p - line + 1);
+}
+
 /*
  * "virtcol2col({winid}, {lnum}, {col})" function
  */
@@ -1586,7 +1605,7 @@ f_virtcol2col(typval_T *argvars UNUSED, typval_T *rettv)
 if (error || screencol < 0)
return;
 
-rettv->vval.v_number = vcol2col(wp, lnum, screencol);
+rettv->vval.v_number = virtcol2col(wp, lnum, screencol);
 }
 #endif
 
diff --git a/src/testdir/test_cursor_func.vim b/src/testdir/test_cursor_func.vim
index 74d7581db..2ae7580a4 100644
--- a/src/testdir/test_cursor_func.vim
+++ b/src/testdir/test_cursor_func.vim
@@ -531,6 +531,15 @@ func Test_virtcol2col()
   call assert_equal(-1, virtcol2col(0, -1, 1))
   call assert_equal(-1, virtcol2col(0, 1, -1))
   call assert_equal(5, virtcol2col(0, 1, 20))
+
+  " Multibyte character
+  call setline(1, ['a✅✅✅'])
+  call assert_equal(1, virtcol2col(0, 1, 1))
+  call assert_equal(2, virtcol2col(0, 1, 3))
+  call assert_equal(5, virtcol2col(0, 1, 5))
+  call assert_equal(8, virtcol2col(0, 1, 7))
+  call assert_equal(8, virtcol2col(0, 1, 8))
+
   call assert_fails('echo virtcol2col("0", 1, 20)', 'E1210:')
   call assert_fails('echo virtcol2col(0, "1", 20)', 'E1210:')
   call assert_fails('echo virtcol2col(0, 1, "1")', 'E1210:')
diff --git a/src/version.c b/src/version.c
index 80bd77d64..d5d18556a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+1717,
 /**/
 1716,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW1NX-003c8A-FI%40256bit.org.


patch 9.0.1716: Windows build with python 3.12 and clang fails

2023-08-15 Fir de Conversatie Christian Brabandt
patch 9.0.1716: Windows build with python 3.12 and clang fails

Commit: 
https://github.com/vim/vim/commit/15a0a0281a060fd5968ca2f3c80e750137106adb
Author: Zdenek Dohnal 
Date:   Tue Aug 15 22:52:01 2023 +0200

patch 9.0.1716: Windows build with python 3.12 and clang fails

Problem: Windows build with python 3.12 and clang fails
Solution: Remove the PyBool_Type function pointer for python 3.12

Clang on Win doesn't like non-static functions in static struct with
Python 3.12 - removing the new obfuscated function and protecting the
old PyBool function for older Pythons fixes the issue.

closes: #12800

Signed-off-by: Christian Brabandt 
Co-authored-by: Zdenek Dohnal 

diff --git a/src/if_python3.c b/src/if_python3.c
index 0a0d31e69..e4d4a90ed 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -628,9 +628,8 @@ static struct
 {"PyStdPrinter_Type", (PYTHON_PROC*)&py3_PyStdPrinter_Type},
 {"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type},
 {"PyFloat_Type", (PYTHON_PROC*)&py3_PyFloat_Type},
+# if PY_VERSION_HEX < 0x030c00b0
 {"PyBool_Type", (PYTHON_PROC*)&py3_PyBool_Type},
-# if PY_VERSION_HEX >= 0x030c00b0
-{"PyLong_Type", (PYTHON_PROC*)&py3_PyLong_Type},
 # endif
 {"PyNumber_Check", (PYTHON_PROC*)&py3_PyNumber_Check},
 {"PyNumber_Long", (PYTHON_PROC*)&py3_PyNumber_Long},
diff --git a/src/version.c b/src/version.c
index c759da9c8..80bd77d64 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+1716,
 /**/
 1715,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW194-003b33-Ib%40256bit.org.


patch 9.0.1715: duplicate test in message_test.c

2023-08-15 Fir de Conversatie Christian Brabandt
patch 9.0.1715: duplicate test in message_test.c

Commit: 
https://github.com/vim/vim/commit/7772c93a3ec1ce60469e9aea9899687ae1141f34
Author: zeertzjq 
Date:   Tue Aug 15 22:48:40 2023 +0200

patch 9.0.1715: duplicate test in message_test.c

Problem: duplicate test in message_test.c
Solution: Remove duplicate test and make functions static

closes: #12803

Signed-off-by: Christian Brabandt 
Co-authored-by: zeertzjq 

diff --git a/src/message_test.c b/src/message_test.c
index 4ad8041a4..e5fd56230 100644
--- a/src/message_test.c
+++ b/src/message_test.c
@@ -402,11 +402,6 @@ test_vim_snprintf_positional(void)
assert(bsize == 0 || STRNCMP(buf, "9 1234567 7654321", bsize_int) == 0);
assert(bsize == 0 || buf[MIN(n, bsize_int)] == '\0');
 
-   n = vim_snprintf(buf, bsize, "%2$d %1$llu %3$lu", 1234567LLU, 9, 
7654321UL);
-   assert(n == 17);
-   assert(bsize == 0 || STRNCMP(buf, "9 1234567 7654321", bsize_int) == 0);
-   assert(bsize == 0 || buf[MIN(n, bsize_int)] == '\0');
-
n = vim_snprintf(buf, bsize, "%2$d %1$x %3$lu", 0xdeadbeef, 9, 
7654321UL);
assert(n == 18);
assert(bsize == 0 || STRNCMP(buf, "9 deadbeef 7654321", bsize_int) == 
0);
diff --git a/src/strings.c b/src/strings.c
index ead59164e..e5ad9cda3 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -2260,7 +2260,7 @@ enum
 
 /* Types that can be used in a format string
  */
-int
+static int
 format_typeof(
 const char *type,
 intusetvs UNUSED)
@@ -2386,7 +2386,7 @@ format_typeof(
 return TYPE_UNKNOWN;
 }
 
-char *
+static char *
 format_typename(
 const char  *type)
 {
@@ -2429,7 +2429,7 @@ format_typename(
 return _(typename_unknown);
 }
 
-int
+static int
 adjust_types(
 const char ***ap_types,
 int arg,
@@ -2490,7 +2490,7 @@ adjust_types(
 return OK;
 }
 
-int
+static int
 parse_fmt_types(
 const char  ***ap_types,
 int*num_posarg,
@@ -2788,7 +2788,7 @@ error:
 return FAIL;
 }
 
-void
+static void
 skip_to_arg(
 const char **ap_types,
 va_listap_start,
diff --git a/src/version.c b/src/version.c
index fa4516803..c759da9c8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+1715,
 /**/
 1714,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW192-003b2b-Pg%40256bit.org.


patch 9.0.1714: getcompletion() "cmdline" fails after :autocmd

2023-08-15 Fir de Conversatie Christian Brabandt
patch 9.0.1714: getcompletion() "cmdline" fails after :autocmd

Commit: 
https://github.com/vim/vim/commit/e4c79d36150431ffb97cb8952ec482af2e57f228
Author: zeertzjq 
Date:   Tue Aug 15 22:41:53 2023 +0200

patch 9.0.1714: getcompletion() "cmdline" fails after :autocmd

Problem:  getcompletion() "cmdline" fails after :autocmd
Solution: Use set_cmd_context() instead of set_one_cmd_context().

closes: #12804

Signed-off-by: Christian Brabandt 
Co-authored-by: zeertzjq 

diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 09691066e..61532b91b 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -4017,9 +4017,10 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
 ExpandInit(&xpc);
 if (STRCMP(type, "cmdline") == 0)
 {
-   set_one_cmd_context(&xpc, pat);
+   int cmdline_len = (int)STRLEN(pat);
+   set_cmd_context(&xpc, pat, cmdline_len, cmdline_len, FALSE);
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
-   xpc.xp_col = (int)STRLEN(pat);
+   xpc.xp_col = cmdline_len;
 }
 else
 {
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index ba3af3c71..b5dec0695 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -612,6 +612,8 @@ func Test_getcompletion()
   call assert_true(index(l, 'taglist(') >= 0)
   let l = getcompletion('call paint', 'cmdline')
   call assert_equal([], l)
+  let l = getcompletion('autocmd BufEnter * map '], l)
 
   func T(a, c, p)
 let g:cmdline_compl_params = [a:a, a:c, a:p]
@@ -3498,14 +3500,15 @@ func Test_rulerformat_position()
   call StopVimInTerminal(buf)
 endfunc
 
-func Test_usercmd_completion()
-  let g:complete=[]
+func Test_getcompletion_usercmd()
   command! -nargs=* -complete=command TestCompletion echo 
-  let g:complete = getcompletion('TestCompletion ', 'cmdline')
-  let a = getcompletion('', 'cmdline')
 
-  call assert_equal(a, g:complete)
+  call assert_equal(getcompletion('', 'cmdline'),
+\ getcompletion('TestCompletion ', 'cmdline'))
+  call assert_equal([''],
+\ getcompletion('TestCompletion map xp_context == EXPAND_NOTHING)
-   xp->xp_context = context;
return arg;
-}
 if (context == EXPAND_MAPPINGS)
return set_context_in_map_cmd(xp, (char_u *)"map", arg, forceit, FALSE,
FALSE, CMD_map);
diff --git a/src/version.c b/src/version.c
index 15e692dd5..fa4516803 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+1714,
 /**/
 1713,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW191-003b2C-Ka%40256bit.org.


patch 9.0.1713: Github CI fails to load snd-dummy kernel module

2023-08-15 Fir de Conversatie Christian Brabandt
patch 9.0.1713: Github CI fails to load snd-dummy kernel module

Commit: 
https://github.com/vim/vim/commit/ba913b14dde28f1f49b73a15f0a75038e12fde27
Author: Zdenek Dohnal 
Date:   Tue Aug 15 22:34:45 2023 +0200

patch 9.0.1713: Github CI fails to load snd-dummy kernel module

Problem: Github CI fails to load snd-dummy kernel module
Solution: Make installation of linux-modules-extra optional

linux-modules-extra package are not available on Ubuntu 22 at the
moment, which breaks CI runs. The change make its installation
conditional as the original `if-else` structure tried to do.

closes: #12801

Signed-off-by: Christian Brabandt 
Co-authored-by: Zdenek Dohnal 

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 104476b45..e5715d3af 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -180,21 +180,23 @@ jobs:
   sudo usermod -a -G audio "${USER}"
   sudo bash ci/setup-xvfb.sh
 
-  - name: Set up snd-dummy
+  - name: Check if linux-modules-extra is available
+id: check-snd-dummy
 if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 
'vimtags')))
+continue-on-error: true
+run: |
+  sudo apt-get install -d -y linux-modules-extra-${{ env.LINUX_VERSION 
}}
+
+  - name: Set up snd-dummy
+if: steps.check-snd-dummy.outcome == 'success' && 
(!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
 env:
   DEST_DIR: ${{ env.TMPDIR }}/linux-modules-extra-${{ 
env.LINUX_VERSION }}
 run: |
   cd /lib/modules/${{ env.LINUX_VERSION }}
-  if apt-cache show linux-modules-extra-${{ env.LINUX_VERSION }} 
>/dev/null 2>&1 ; then
-  sudo apt-get install -d -y linux-modules-extra-${{ env.LINUX_VERSION 
}}
   sudo dpkg -x /var/cache/apt/archives/linux-modules-extra-${{ 
env.LINUX_VERSION }}*.deb "${DEST_DIR}"
   tar -cvC "${DEST_DIR}"/lib/modules/${{ env.LINUX_VERSION }} 
kernel/sound | sudo tar -x
   sudo depmod --verbose
-  sudo modprobe --verbose snd-dummy
-  else
-  echo "Module " linux-modules-extra-${{ env.LINUX_VERSION }} "doesn't 
seem to exist, continue anyway"; exit 0
-  fi
+  sudo modprobe --verbose snd-dummy 
 
   - name: Check autoconf
 if: contains(matrix.extra, 'unittests')
diff --git a/src/version.c b/src/version.c
index 45f5527d1..15e692dd5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+1713,
 /**/
 1712,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW0uV-003ZyV-PH%40256bit.org.


Re: patch 9.0.1704: Cannot use positional arguments for printf()

2023-08-15 Fir de Conversatie Christ van Willegen
Op di 15 aug. 2023 21:27 schreef John Marriott :

> On 14-Aug-2023 02:15, Christian Brabandt wrote:
> > patch 9.0.1704: Cannot use positional arguments for printf()
> >
> > Commit:
> https://github.com/vim/vim/commit/0c6181fec4c362eb9682d5af583341eb20cb1af5
> > Author: Christ van Willegen 
> > Date:   Sun Aug 13 18:03:14 2023 +0200
> >
> >  patch 9.0.1704: Cannot use positional arguments for printf()
> >
> >  Problem: Cannot use positional arguments for printf()
> >  Solution: Support positional arguments in string formatting
> >
> >  closes: #12140
> >
> >  Signed-off-by: Christian Brabandt 
> >  Co-authored-by: Christ van Willegen 
> >
> >
> Hi All,
>
> After this patch my HPUX build fails with this linker error:
> 


Do the tests still work after this patch?

Christ van Willegen

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CA%2BOt1OxAM8ri0a%2BUmgNuZWDj%2B-LPn9bj0Y2L3hDsRVyadyTPQQ%40mail.gmail.com.


Re: patch 9.0.1704: Cannot use positional arguments for printf()

2023-08-15 Fir de Conversatie John Marriott

On 14-Aug-2023 02:15, Christian Brabandt wrote:

patch 9.0.1704: Cannot use positional arguments for printf()

Commit: 
https://github.com/vim/vim/commit/0c6181fec4c362eb9682d5af583341eb20cb1af5
Author: Christ van Willegen 
Date:   Sun Aug 13 18:03:14 2023 +0200

 patch 9.0.1704: Cannot use positional arguments for printf()
 
 Problem: Cannot use positional arguments for printf()

 Solution: Support positional arguments in string formatting
 
 closes: #12140
 
 Signed-off-by: Christian Brabandt 

 Co-authored-by: Christ van Willegen 



Hi All,

After this patch my HPUX build fails with this linker error:

Starting make in the src directory.
If there are problems, cd to the src directory and run make there
    cd src && make first
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o 
objects/strings.o strings.c
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT 
version.c -o objects/version.o

link.sh: The file 'auto/link.sed' exists, which is going to be used now.
link.sh: If linking fails, try deleting the auto/link.sed file.
link.sh: If this fails too, try creating an empty auto/link.sed file.
link.sh: Using auto/link.sed file to omit a few libraries
  cc   -L/usr/local/lib     -o vim objects/alloc.o  objects/arabic.o 
 objects/arglist.o  objects/autocmd.o  objects/beval.o 
 objects/buffer.o  objects/change.o  objects/blob.o  objects/blowfish.o 
 objects/cindent.o  objects/clientserver.o  objects/clipboard.o 
 objects/cmdexpand.o  objects/cmdhist.o  objects/crypt.o 
 objects/crypt_zip.o  objects/debugger.o  objects/dict.o 
 objects/diff.o  objects/digraph.o  objects/drawline.o 
 objects/drawscreen.o  objects/edit.o  objects/eval.o 
 objects/evalbuffer.o  objects/evalfunc.o  objects/evalvars.o 
 objects/evalwindow.o  objects/ex_cmds.o  objects/ex_cmds2.o 
 objects/ex_docmd.o  objects/ex_eval.o  objects/ex_getln.o 
 objects/fileio.o  objects/filepath.o  objects/findfile.o 
 objects/float.o  objects/fold.o  objects/getchar.o  objects/gui_xim.o 
 objects/hardcopy.o  objects/hashtab.o  objects/help.o 
 objects/highlight.o  objects/if_cscope.o  objects/if_xcmdsrv.o 
 objects/indent.o  objects/insexpand.o  objects/list.o 
 objects/locale.o  objects/logfile.o  objects/map.o  objects/mark.o 
 objects/match.o  objects/mbyte.o  objects/memline.o  objects/menu.o 
 objects/misc1.o  objects/misc2.o  objects/mouse.o  objects/move.o 
 objects/normal.o  objects/ops.o  objects/option.o  objects/optionstr.o 
 objects/os_unix.o  objects/pathdef.o  objects/popupmenu.o 
 objects/popupwin.o  objects/profiler.o  objects/pty.o 
 objects/quickfix.o  objects/regexp.o  objects/register.o 
 objects/screen.o  objects/scriptfile.o  objects/search.o 
 objects/session.o  objects/sha256.o  objects/sign.o  objects/sound.o 
 objects/spell.o  objects/spellfile.o  objects/spellsuggest.o 
 objects/strings.o  objects/syntax.o  objects/tag.o  objects/term.o 
 objects/terminal.o  objects/testing.o  objects/textformat.o 
 objects/textobject.o  objects/textprop.o  objects/time.o 
 objects/typval.o  objects/ui.o  objects/undo.o  objects/usercmd.o 
 objects/userfunc.o  objects/version.o  objects/vim9class.o 
 objects/vim9cmds.o  objects/vim9compile.o  objects/vim9execute.o 
 objects/vim9expr.o  objects/vim9instr.o  objects/vim9script.o 
 objects/vim9type.o  objects/viminfo.o  objects/window.o 
 objects/bufwrite.o               objects/charset.o  objects/json.o 
 objects/main.o  objects/memfile.o  objects/message.o               -lm 
-ltermlib

/usr/ccs/bin/ld: Unsatisfied symbols:
   va_copy (first referenced in objects/strings.o) (code)
link.sh: Linking failed, making auto/link.sed empty and trying again
creating auto/pathdef.c
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o 
objects/pathdef.o auto/pathdef.c

link.sh: Using unmodified link command
  cc   -L/usr/local/lib     -o vim objects/alloc.o  objects/arabic.o 
 objects/arglist.o  objects/autocmd.o  objects/beval.o 
 objects/buffer.o  objects/change.o  objects/blob.o  objects/blowfish.o 
 objects/cindent.o  objects/clientserver.o  objects/clipboard.o 
 objects/cmdexpand.o  objects/cmdhist.o  objects/crypt.o 
 objects/crypt_zip.o  objects/debugger.o  objects/dict.o 
 objects/diff.o  objects/digraph.o  objects/drawline.o 
 objects/drawscreen.o  objects/edit.o  objects/eval.o 
 objects/evalbuffer.o  objects/evalfunc.o  objects/evalvars.o 
 objects/evalwindow.o  objects/ex_cmds.o  objects/ex_cmds2.o 
 objects/ex_docmd.o  objects/ex_eval.o  objects/ex_getln.o 
 objects/fileio.o  objects/filepath.o  objects/findfile.o 
 objects/float.o  objects/fold.o  objects/getchar.o  objects/gui_xim.o 
 objects/hardcopy.o  objects/hashtab.o  objects/help.o 
 objects/highlight.o  objects/if_cscope.o  objects/if_xcmdsrv.o 
 objects/indent.o  objects/insexpand.o  objects/list.o 
 objects/locale.o  objects/logfile.o  objects/map.o  objects/mark.o 
 objects/match.o  objects/mbyte.o  objects/memline.o  objects/menu.o 
 objects/misc1

Re: CI Linux tests are failing

2023-08-15 Fir de Conversatie Christian Brabandt


On Di, 15 Aug 2023, Christian Brabandt wrote:

> 
> On Mo, 14 Aug 2023, Yegappan Lakshmanan wrote:
> 
> > Hi,
> > 
> > The CI Linux tests are failing for the past few days due to missing
> > linux-modules-extra-5.15.0-1042-azure package.
> > 
> > Should we disable the sound tests temporarily and disable the installation
> > of this package?
> 
> There is actually a check, that should catch if the module exists. 
> Apparently  that test returns true (meaning the package should exists) 
> but is still not installable.
> 
> I have for now created https://github.com/vim/vim/pull/12802 as a 
> temporary work-around. Hopefully this works.

Here is the relevant Github Runner issue: 
https://github.com/actions/runner-images/issues/8080

Best,
Christian
-- 
TOO BAD YOU CAN'T BUY a voodoo globe so that you could make the earth spin
real fast and freak everybody out.
-- Jack Handey, The New Mexican, 1988.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ZNsqAEDOnUifK%2BK4%40256bit.org.


Re: CI Linux tests are failing

2023-08-15 Fir de Conversatie Christian Brabandt


On Mo, 14 Aug 2023, Yegappan Lakshmanan wrote:

> Hi,
> 
> The CI Linux tests are failing for the past few days due to missing
> linux-modules-extra-5.15.0-1042-azure package.
> 
> Should we disable the sound tests temporarily and disable the installation
> of this package?

There is actually a check, that should catch if the module exists. 
Apparently  that test returns true (meaning the package should exists) 
but is still not installable.

I have for now created https://github.com/vim/vim/pull/12802 as a 
temporary work-around. Hopefully this works.

Best,
Christian
-- 
Give all orders verbally.  Never write anything down that might go into a
"Pearl Harbor File".

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ZNslHNOg2Gj0C6u4%40256bit.org.