Re: syntax/ratpoison.vim update
Bram Moolenaar wrote: Magnus Woldrich wrote: Attached is an updated ratpoison.vim syntax file. It's also here[0]. [0] https://github.com/trapd00r/vim-syntax-ratpoison/commit/873a2e465a314d5017a56c90d15f7bef18dbc43c The patch doesn't apply to what I have, thus I got the file from github. Note that the header has "Maintaner" instead of "Maintainer", I fixed that. Maybe along with the rat poison one gets a tan? Chip -- -- 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/f9128d17-a0ea-59f9-8eac-4324710afc47%40drchip.org.
Re: Patch 8.2.2759
I wrote: > Patch 8.2.2759 > Problem:Vim9: for loop infers type of loop variable. > Solution: Do not get the member type. (closes #8102) > Files: src/vim9type.c, src/proto/vim9type.pro, src/list.c, > src/vim9script.c, src/proto/vim9script.pro, src/vim.h, > src/testdir/test_vim9_script.vim The changes to evalvars.c were missing here, they are included in 2760. -- >From "know your smileys": :.-( Crying /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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/202104131956.13DJuEYi1065474%40masaka.moolenaar.net.
Patch 8.2.2760
Patch 8.2.2760 Problem:Vim9: no error for changing a for loop variable. Solution: Make the loop variable read-only. (issue #8102) Files: src/eval.c, src/evalvars.c, src/vim9compile.c, src/vim.h, src/testdir/test_vim9_script.vim *** ../vim-8.2.2759/src/eval.c 2021-04-12 21:20:58.634708976 +0200 --- src/eval.c 2021-04-13 21:33:38.330057046 +0200 *** *** 1351,1357 { typval_T tv; ! if (flags & (ASSIGN_CONST | ASSIGN_FINAL)) { emsg(_(e_cannot_mod)); *endp = cc; --- 1351,1358 { typval_T tv; ! if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) !&& (flags & ASSIGN_FOR_LOOP) == 0) { emsg(_(e_cannot_mod)); *endp = cc; *** *** 1390,1396 listitem_T *ll_li = lp->ll_li; int ll_n1 = lp->ll_n1; ! if (flags & (ASSIGN_CONST | ASSIGN_FINAL)) { emsg(_("E996: Cannot lock a range")); return; --- 1391,1398 listitem_T *ll_li = lp->ll_li; int ll_n1 = lp->ll_n1; ! if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) !&& (flags & ASSIGN_FOR_LOOP) == 0) { emsg(_("E996: Cannot lock a range")); return; *** *** 1449,1455 /* * Assign to a List or Dictionary item. */ ! if (flags & (ASSIGN_CONST | ASSIGN_FINAL)) { emsg(_("E996: Cannot lock a list or dict")); return; --- 1451,1458 /* * Assign to a List or Dictionary item. */ ! if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) !&& (flags & ASSIGN_FOR_LOOP) == 0) { emsg(_("E996: Cannot lock a list or dict")); return; *** *** 1775,1781 { forinfo_T *fi = (forinfo_T *)fi_void; int result; ! int flag = in_vim9script() ? ASSIGN_DECL : 0; listitem_T*item; if (fi->fi_blob != NULL) --- 1778,1786 { forinfo_T *fi = (forinfo_T *)fi_void; int result; ! int flag = ASSIGN_FOR_LOOP | (in_vim9script() !? (ASSIGN_FINAL | ASSIGN_DECL | ASSIGN_NO_MEMBER_TYPE) !: 0); listitem_T*item; if (fi->fi_blob != NULL) *** ../vim-8.2.2759/src/evalvars.c 2021-04-10 22:35:40.487360271 +0200 --- src/evalvars.c 2021-04-13 21:44:23.604852104 +0200 *** *** 1315,1321 // ":let $VAR = expr": Set environment variable. if (*arg == '$') { ! if (flags & (ASSIGN_CONST | ASSIGN_FINAL)) { emsg(_("E996: Cannot lock an environment variable")); return NULL; --- 1315,1322 // ":let $VAR = expr": Set environment variable. if (*arg == '$') { ! if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) !&& (flags & ASSIGN_FOR_LOOP) == 0) { emsg(_("E996: Cannot lock an environment variable")); return NULL; *** *** 1365,1373 // ":let &option = expr": Set option value. // ":let &l:option = expr": Set local option value. // ":let &g:option = expr": Set global option value. else if (*arg == '&') { ! if (flags & (ASSIGN_CONST | ASSIGN_FINAL)) { emsg(_(e_const_option)); return NULL; --- 1366,1376 // ":let &option = expr": Set option value. // ":let &l:option = expr": Set local option value. // ":let &g:option = expr": Set global option value. + // ":for &ts in range(8)": Set option value for for loop else if (*arg == '&') { ! if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) !&& (flags & ASSIGN_FOR_LOOP) == 0) { emsg(_(e_const_option)); return NULL; *** *** 1466,1472 // ":let @r = expr": Set register contents. else if (*arg == '@') { ! if (flags & (ASSIGN_CONST | ASSIGN_FINAL)) { emsg(_("E996: Cannot lock a register")); return NULL; --- 1469,1476 // ":let @r = expr": Set register contents. else if (*arg == '@') { ! if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) !&& (flags & ASSIGN_FOR_LOOP) == 0) { emsg(_("E996: Cannot lock a register")); return NULL; *** *** 3158,3164 type_T*type, typval_T *tv_arg, int copy, // make copy of value in "tv" ! int flags, // ASSIGN_CONST, ASSIGN_FINAL, etc. int var_idx)//
Re: Patch 8.2.2759
i can't build after pulling this patch On Tue, Apr 13, 2021 at 1:54 PM Bram Moolenaar wrote: > > Patch 8.2.2759 > Problem:Vim9: for loop infers type of loop variable. > Solution: Do not get the member type. (closes #8102) > Files: src/vim9type.c, src/proto/vim9type.pro, src/list.c, > src/vim9script.c, src/proto/vim9script.pro, src/vim.h, > src/testdir/test_vim9_script.vim > > > *** ../vim-8.2.2758/src/vim9type.c 2021-03-18 22:15:00.589208304 +0100 > --- src/vim9type.c 2021-04-13 20:37:54.449383083 +0200 > *** > *** 252,260 > /* >* Get a type_T for a typval_T. >* "type_gap" is used to temporarily create types in. >*/ > static type_T * > ! typval2type_int(typval_T *tv, int copyID, garray_T *type_gap) > { > type_T *type; > type_T *member_type = &t_any; > --- 252,261 > /* >* Get a type_T for a typval_T. >* "type_gap" is used to temporarily create types in. > + * When "do_member" is TRUE also get the member type, otherwise use > "any". >*/ > static type_T * > ! typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int > do_member) > { > type_T *type; > type_T *member_type = &t_any; > *** > *** 274,279 > --- 275,282 > > if (l == NULL || l->lv_first == NULL) > return &t_list_empty; > + if (!do_member) > + return &t_list_any; > if (l->lv_first == &range_list_item) > return &t_list_number; > if (l->lv_copyID == copyID) > *** > *** 282,290 > l->lv_copyID = copyID; > > // Use the common type of all members. > ! member_type = typval2type(&l->lv_first->li_tv, copyID, type_gap); > for (li = l->lv_first->li_next; li != NULL; li = li->li_next) > ! common_type(typval2type(&li->li_tv, copyID, type_gap), > member_type, &member_type, > type_gap); > return get_list_type(member_type, type_gap); > } > --- 285,293 > l->lv_copyID = copyID; > > // Use the common type of all members. > ! member_type = typval2type(&l->lv_first->li_tv, copyID, type_gap, > TRUE); > for (li = l->lv_first->li_next; li != NULL; li = li->li_next) > ! common_type(typval2type(&li->li_tv, copyID, type_gap, TRUE), > member_type, &member_type, > type_gap); > return get_list_type(member_type, type_gap); > } > *** > *** 297,302 > --- 300,307 > > if (d == NULL || d->dv_hashtab.ht_used == 0) > return &t_dict_empty; > + if (!do_member) > + return &t_dict_any; > if (d->dv_copyID == copyID) > // avoid recursion > return &t_dict_any; > *** > *** 305,313 > // Use the common type of all values. > dict_iterate_start(tv, &iter); > dict_iterate_next(&iter, &value); > ! member_type = typval2type(value, copyID, type_gap); > while (dict_iterate_next(&iter, &value) != NULL) > ! common_type(typval2type(value, copyID, type_gap), > member_type, &member_type, > type_gap); > return get_dict_type(member_type, type_gap); > } > --- 310,318 > // Use the common type of all values. > dict_iterate_start(tv, &iter); > dict_iterate_next(&iter, &value); > ! member_type = typval2type(value, copyID, type_gap, TRUE); > while (dict_iterate_next(&iter, &value) != NULL) > ! common_type(typval2type(value, copyID, type_gap, TRUE), > member_type, &member_type, > type_gap); > return get_dict_type(member_type, type_gap); > } > *** > *** 378,388 > /* >* Get a type_T for a typval_T. >* "type_list" is used to temporarily create types in. >*/ > type_T * > ! typval2type(typval_T *tv, int copyID, garray_T *type_gap) > { > ! type_T *type = typval2type_int(tv, copyID, type_gap); > > if (type != NULL && type != &t_bool > && (tv->v_type == VAR_NUMBER > --- 383,394 > /* >* Get a type_T for a typval_T. >* "type_list" is used to temporarily create types in. > + * When "do_member" is TRUE also get the member type, otherwise use > "any". >*/ > type_T * > ! typval2type(typval_T *tv, int copyID, garray_T *type_gap, int do_member) > { > ! type_T *type = typval2type_int(tv, copyID, type_gap, do_member); > > if (type != NULL && type != &t_bool > && (tv->v_type == VAR_NUMBER > *** > *** 404,410 > return &t_list_string; > if (tv->v_type == VAR_DICT) // e.g. for v:completed_item > return &t_dict_any; > ! return typval2type(tv, get_copyID(), type_gap); > } > > int > --- 410,416 > return &t_list_str
Re: Patch 8.2.2759
Have the same error with debian: evalvars.c: In function ‘set_var_const’: evalvars.c:3258:3: error: too few arguments to function ‘update_vim9_script_var’ update_vim9_script_var(FALSE, di, flags, tv, &type); ^~ In file included from proto.h:236, from vim.h:2165, from evalvars.c:14: proto/vim9script.pro:15:6: note: declared here void update_vim9_script_var(int create, dictitem_T *di, int flags, typval_T *tv, type_T **type, int do_member); ^~ evalvars.c:3356:6: error: too few arguments to function ‘update_vim9_script_var’ update_vim9_script_var(TRUE, di, flags, tv, &type); ^~ In file included from proto.h:236, from vim.h:2165, from evalvars.c:14: proto/vim9script.pro:15:6: note: declared here void update_vim9_script_var(int create, dictitem_T *di, int flags, typval_T *tv, type_T **type, int do_member); ^~ вторник, 13 апреля 2021 г. в 22:08:25 UTC+3, basi...@internode.on.net: > > On 14-Apr-2021 04:54, Bram Moolenaar wrote: > > Patch 8.2.2759 > > Problem: Vim9: for loop infers type of loop variable. > > Solution: Do not get the member type. (closes #8102) > > Files: src/vim9type.c, src/proto/vim9type.pro, src/list.c, > > src/vim9script.c, src/proto/vim9script.pro, src/vim.h, > > src/testdir/test_vim9_script.vim > > > > > After this patch mingw64 (gcc 10.3.0) spits out this error: > > gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 > -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO > -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return > -fpie -fPIE evalvars.c -o objnative/evalvars.o > evalvars.c: In function 'set_var_const': > evalvars.c:3258:3: error: too few arguments to function > 'update_vim9_script_var' > 3258 | update_vim9_script_var(FALSE, di, flags, tv, &type); > | ^~ > In file included from proto.h:236, > from vim.h:2165, > from evalvars.c:14: > proto/vim9script.pro:15:6: note: declared here >15 | void update_vim9_script_var(int create, dictitem_T *di, int > flags, typval_T *tv, type_T **type, int do_member); > | ^~ > evalvars.c:3356:6: error: too few arguments to function > 'update_vim9_script_var' > 3356 | update_vim9_script_var(TRUE, di, flags, tv, &type); > | ^~ > In file included from proto.h:236, > from vim.h:2165, > from evalvars.c:14: > proto/vim9script.pro:15:6: note: declared here >15 | void update_vim9_script_var(int create, dictitem_T *di, int > flags, typval_T *tv, type_T **type, int do_member); > | ^~ > make: *** [Make_cyg_ming.mak:1145: objnative/evalvars.o] Error 1 > > > Cheers > John > -- -- 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/e129afb4-1708-4d44-8ee4-31932e6a4efan%40googlegroups.com.
Re: Patch 8.2.2759
On 14-Apr-2021 04:54, Bram Moolenaar wrote: Patch 8.2.2759 Problem:Vim9: for loop infers type of loop variable. Solution: Do not get the member type. (closes #8102) Files: src/vim9type.c, src/proto/vim9type.pro, src/list.c, src/vim9script.c, src/proto/vim9script.pro, src/vim.h, src/testdir/test_vim9_script.vim After this patch mingw64 (gcc 10.3.0) spits out this error: gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -fpie -fPIE evalvars.c -o objnative/evalvars.o evalvars.c: In function 'set_var_const': evalvars.c:3258:3: error: too few arguments to function 'update_vim9_script_var' 3258 | update_vim9_script_var(FALSE, di, flags, tv, &type); | ^~ In file included from proto.h:236, from vim.h:2165, from evalvars.c:14: proto/vim9script.pro:15:6: note: declared here 15 | void update_vim9_script_var(int create, dictitem_T *di, int flags, typval_T *tv, type_T **type, int do_member); | ^~ evalvars.c:3356:6: error: too few arguments to function 'update_vim9_script_var' 3356 | update_vim9_script_var(TRUE, di, flags, tv, &type); | ^~ In file included from proto.h:236, from vim.h:2165, from evalvars.c:14: proto/vim9script.pro:15:6: note: declared here 15 | void update_vim9_script_var(int create, dictitem_T *di, int flags, typval_T *tv, type_T **type, int do_member); | ^~ make: *** [Make_cyg_ming.mak:1145: objnative/evalvars.o] Error 1 Cheers John -- -- 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/0c4d0031-433a-f1f9-1225-3314cc24a437%40internode.on.net.
Patch 8.2.2759
Patch 8.2.2759 Problem:Vim9: for loop infers type of loop variable. Solution: Do not get the member type. (closes #8102) Files: src/vim9type.c, src/proto/vim9type.pro, src/list.c, src/vim9script.c, src/proto/vim9script.pro, src/vim.h, src/testdir/test_vim9_script.vim *** ../vim-8.2.2758/src/vim9type.c 2021-03-18 22:15:00.589208304 +0100 --- src/vim9type.c 2021-04-13 20:37:54.449383083 +0200 *** *** 252,260 /* * Get a type_T for a typval_T. * "type_gap" is used to temporarily create types in. */ static type_T * ! typval2type_int(typval_T *tv, int copyID, garray_T *type_gap) { type_T *type; type_T *member_type = &t_any; --- 252,261 /* * Get a type_T for a typval_T. * "type_gap" is used to temporarily create types in. + * When "do_member" is TRUE also get the member type, otherwise use "any". */ static type_T * ! typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int do_member) { type_T *type; type_T *member_type = &t_any; *** *** 274,279 --- 275,282 if (l == NULL || l->lv_first == NULL) return &t_list_empty; + if (!do_member) + return &t_list_any; if (l->lv_first == &range_list_item) return &t_list_number; if (l->lv_copyID == copyID) *** *** 282,290 l->lv_copyID = copyID; // Use the common type of all members. ! member_type = typval2type(&l->lv_first->li_tv, copyID, type_gap); for (li = l->lv_first->li_next; li != NULL; li = li->li_next) ! common_type(typval2type(&li->li_tv, copyID, type_gap), member_type, &member_type, type_gap); return get_list_type(member_type, type_gap); } --- 285,293 l->lv_copyID = copyID; // Use the common type of all members. ! member_type = typval2type(&l->lv_first->li_tv, copyID, type_gap, TRUE); for (li = l->lv_first->li_next; li != NULL; li = li->li_next) ! common_type(typval2type(&li->li_tv, copyID, type_gap, TRUE), member_type, &member_type, type_gap); return get_list_type(member_type, type_gap); } *** *** 297,302 --- 300,307 if (d == NULL || d->dv_hashtab.ht_used == 0) return &t_dict_empty; + if (!do_member) + return &t_dict_any; if (d->dv_copyID == copyID) // avoid recursion return &t_dict_any; *** *** 305,313 // Use the common type of all values. dict_iterate_start(tv, &iter); dict_iterate_next(&iter, &value); ! member_type = typval2type(value, copyID, type_gap); while (dict_iterate_next(&iter, &value) != NULL) ! common_type(typval2type(value, copyID, type_gap), member_type, &member_type, type_gap); return get_dict_type(member_type, type_gap); } --- 310,318 // Use the common type of all values. dict_iterate_start(tv, &iter); dict_iterate_next(&iter, &value); ! member_type = typval2type(value, copyID, type_gap, TRUE); while (dict_iterate_next(&iter, &value) != NULL) ! common_type(typval2type(value, copyID, type_gap, TRUE), member_type, &member_type, type_gap); return get_dict_type(member_type, type_gap); } *** *** 378,388 /* * Get a type_T for a typval_T. * "type_list" is used to temporarily create types in. */ type_T * ! typval2type(typval_T *tv, int copyID, garray_T *type_gap) { ! type_T *type = typval2type_int(tv, copyID, type_gap); if (type != NULL && type != &t_bool && (tv->v_type == VAR_NUMBER --- 383,394 /* * Get a type_T for a typval_T. * "type_list" is used to temporarily create types in. + * When "do_member" is TRUE also get the member type, otherwise use "any". */ type_T * ! typval2type(typval_T *tv, int copyID, garray_T *type_gap, int do_member) { ! type_T *type = typval2type_int(tv, copyID, type_gap, do_member); if (type != NULL && type != &t_bool && (tv->v_type == VAR_NUMBER *** *** 404,410 return &t_list_string; if (tv->v_type == VAR_DICT) // e.g. for v:completed_item return &t_dict_any; ! return typval2type(tv, get_copyID(), type_gap); } int --- 410,416 return &t_list_string; if (tv->v_type == VAR_DICT) // e.g. for v:completed_item return &t_dict_any; ! return typval2type(tv, get_copyID(), type_gap, TRUE); } int *** *** 429,435 int res = FAIL; ga_init2(&type_list, sizeof(type_T *), 10); ! actual_type = typval2type(actual_tv, get_copyID(), &t
VIM Port(s) on Android
Dearly beloved VIM developers! an short introduction to myself, you already got @ vim_use. A bit, i know about to code from my coding experience - but few bytes... I dont want to disturb your coding time, but actually and currently, someone is not being busy and maybe i could get an proper answer? ... This hope came into being, face to face together with vim on android, during the past week. Q: Is there a running DEV idea, and working group of software people, porting VIM to android without to use the JAVA virtual machine? The porting language should be able to be low level. WHY: (Iam not quite sure, but) it seems like the Android LLVM creates faster bytecode for low level languages then for JAVA. I got this impression through using up to date Android APPs from google play running on out of date hardware. The individual call results from my search about a vim runtime on android supporting the Perl Language. E.g., it would be great to script vimscript for VIM @ android near close to the android kernel, then the java solutions provide right now. E.g. NET::, IO::, GUI:: in perl, or terminal pipes. Then VIM could get an big nested app store by vimscript and touch screen :) I would go on with it... THX sincerely -kefko -- Wonderful vim doku: When a mapping triggers itself, it will run forever WEB www.johannes-koehler.de -- -- 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/4c462fdd-6093-62f1-c17a-5d9028c0eb3e%40googlemail.com.