Re: Patch 7.4.2049
On 2016-07-16, Bram Moolenaar wrote: > Patch 7.4.2049 > Problem:There is no way to get a list of the error lists. > Solution: Add ":chistory" and ":lhistory". > Files: src/ex_cmds.h, src/quickfix.c, src/ex_docmd.c, src/message.c, > src/proto/quickfix.pro, src/testdir/test_quickfix.vim Nice addition. As of Vim 7.4.2054, there is no help for :chistory or :lhistory. Regards, Gary -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Got E121: Undefined variable in lambda function
On Sunday, July 17, 2016 at 2:56:44 AM UTC+9, Bram Moolenaar wrote: > Ken Hamada wrote: > > > Hi Bram and Ken Takata. > > > > I think there is some problem in variable substitution of lambda function. > > > > echo ({y -> ({x -> x(y)(10)})({y -> y})})({z -> z}) > > > > yields an error `E121: Undefined variable: y`. I expect this expression > > yields 10. I tested on Vim 7.4.2048. > > > > JavaScript: > > (function(y){ return (function(x){ return x(y)(10); })(function(y){ return > > y; }); })(function(z){ return z; }) > > > > Python: > > (lambda y: (lambda x: x(y)(10))(lambda y: y))(lambda z: z) > > > > Ruby: > > (lambda {|y| (lambda {|x| (x.call(y)).call(10)}).call(lambda {|y| > > y})}).call(lambda {|z| z}) > > > > All these expressions prints 10 as expected. > > This is because Vim does not support a closure yet. You are using this > lambda: > {x -> x(y)(10)} > You can see that "y" is not defined here. It would come from the > context, but that isn't supported. > I see. Thanks for explanation. Regards, Ken Hamada -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Another refactoring of the quickfix code
Yegappan wrote: > I am attaching a patch to refactor the (hopefully the last one) qf_init_ext() > function. This moves the code that parses a line to get the quickfix fields > to a separate function. > > I have also added another quickfix test. Thanks! -- Not too long ago, compress was something you did to garbage... /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Re: Patch 7.4.2044
Christ van Willegen wrote: > a couple of minor text-nitpicks: > > On Fri, Jul 15, 2016 at 9:25 PM, Bram Moolenaarwrote: > > Patch 7.4.2044 > > [snip] > > > + lambda expression *expr-lambda* *lambda* > > + - > > + {args -> expr1} lambda expression > > + > > + A lambda expression creates a new unnamed function which returns the > > result of > > + evaluating |expr1|. Lambda expressions are differ from |user-functions| > > in > > + the following ways: > > That last sentence should read: "Lambda expressions differ from > |user-functions" in > the following ways:" ('are' is to be cut out). > > [Snip] > > > + /* First, check if this is a lambda expression. "->" must exists. */ > > "->" must exist. Thanks! -- Apologies for taking up the bandwidth with the apology. Anything else I can apologise for .. er no can't think of anything, sorry about that. Andy Hunt (Member of British Olympic Apology Squad) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Re: Coverage not reported correctly
I wrote: > > > I has added a test for Farsi. I can see in the Travis log that the > > > tests are executed: > > > > > > Executing Test_farsi_map() > > > xecuting Test_farsi_toggle() > > > ... > > > Executed 2 tests > > > > > > However, the reported coverage for src/farsi.c is zero. > > > What is wrong here? > > > > > > I have also noticed zero coverage being reported for main.c. > > > It also only lists 290 lines are relevant. Perhaps somehow valid source > > > lines are considered not relevant? > > > > So I changed the build to compile arabic.c and farsi.c separately, instead > > of including them from main.c. And now the coverage has increased > > dramatically for farsi.c. > > > > Also look at json.c: The json_encode() function is marked as "missed", > > but I'm sure test_json invokes it. > > > > It definitely looks like there is something fishy about how the > > coverage is estimated. > > I noticed that the new message unittest caused the coverage of the > message.c file to drop radically. I assume this is because when running > the unittest the file is #included (to access static functions) and this > causes the coverage information to be overwritten. > > I have split the tests in scripttests and unittests. I first only ran > the scripttests and now the coverage of main.c makes sense! > > I now try running unittests before scripttests. If the coverage is > indeed overwritten then this should not change the coverage > information... Nope, that doesn't work. > > I'll add a separate target for running the unittests with coverage. > Let's see if that works. I have no experience with .travis.yml, > please correct me if it can be improved. OK, after fixing the mistakes it appears the coverage is now done properly. The hits from running scripttests and unittests are merged. Now we can write tests for the missing pieces! -- What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' meaning 'bloodsucking creatures'. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Patch 7.4.2054
Patch 7.4.2054 (after 7.4.2048) Problem:Wrong part of #ifdef removed. Solution: Use the right part. (Hirohito Higashi) Files: src/os_unix.c *** ../vim-7.4.2053/src/os_unix.c 2016-07-16 14:46:51.135240543 +0200 --- src/os_unix.c 2016-07-16 21:32:52.725776483 +0200 *** *** 4070,4096 #endif int tmode = cur_tmode; #ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */ ! int x; ! /* ! * Set the preferred shell in the EMXSHELL environment variable (but ! * only if it is different from what is already in the environment). ! * Emx then takes care of whether to use "/c" or "-c" in an ! * intelligent way. Simply pass the whole thing to emx's system() call. ! * Emx also starts an interactive shell if system() is passed an empty ! * string. ! */ ! char_u *p, *old; ! ! if (((old = (char_u *)getenv("EMXSHELL")) == NULL) || STRCMP(old, p_sh)) ! { ! /* should check HAVE_SETENV, but I know we don't have it. */ ! p = alloc(10 + strlen(p_sh)); ! if (p) ! { ! sprintf((char *)p, "EMXSHELL=%s", p_sh); ! putenv((char *)p); /* don't free the pointer! */ ! } ! } out_flush(); --- 4070,4076 #endif int tmode = cur_tmode; #ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */ ! char_u*newcmd;/* only needed for unix */ out_flush(); *** ../vim-7.4.2053/src/version.c 2016-07-16 20:43:10.483784247 +0200 --- src/version.c 2016-07-16 21:28:47.804181136 +0200 *** *** 760,761 --- 760,763 { /* Add new patch number below this line */ + /**/ + 2054, /**/ -- I have to exercise early in the morning before my brain figures out what I'm doing. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Re: Patch 7.4.2048
Hirohito Higashi wrote: > Hi Bram and list, > > 2016-7-16(Sat) 21:48:04 UTC+9 Bram Moolenaar: > > Patch 7.4.2048 > > Problem:There is still code and help for unsupported systems. > > Solution: Remove the code and text. (Hirohito Higashi) > > Files: runtime/doc/eval.txt, runtime/lang/menu_sk_sk.vim, > > runtime/menu.vim, runtime/optwin.vim, src/Make_bc5.mak, > > src/ex_docmd.c, src/feature.h, src/fileio.c, src/globals.h, > > src/main.c, src/memfile.c, src/memline.c, src/misc1.c, > > src/misc2.c, src/option.c, src/option.h, src/os_unix.c, > > src/os_unix.h, src/proto.h, src/term.c, src/undo.c, > > src/version.c, > > src/vim.h, src/xxd/xxd.c > > > *** > > *** 4102,4110 > > int tmode = cur_tmode; > > #ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */ > > int x; > > - # ifndef __EMX__ > > - char_u *newcmd; /* only needed for unix */ > > - # else > > /* > >* Set the preferred shell in the EMXSHELL environment variable (but > >* only if it is different from what is already in the environment). > > --- 4071,4076 > > *** > > *** 4125,4131 > > putenv((char *)p); /* don't free the pointer! */ > > } > > } > > - # endif > > Sorry, I have a mistake. > Avobe modified was wrong. > > # ifndef __EMX__ > SECTION_A > # else > SECTION_B > # endif > > I removed SECTION_A. But, It was really SECTION_B such is given should be > deleted. > I wrote a patch. > Please fix this. Thanks! -- Not too long ago, a program was something you watched on TV... /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Re: Functions to get and set the quickfix stack
Yegappan wrote: > There is a patch in the todo list to get and set location list stack: > > Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14) > Second one. Update May 22. > Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15. > > With the recent addition of support for displaying the quickfix/location list > stack, what about merging this patch also? I'll move it up in the todo list. But it's unclear what patch that is. Did Daniel Hahler write a patch with getlocstack()? Please check for tests, since these patches are old I suspect they don't have new style tests. -- Not too long ago, a keyboard was something to make music with... /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Another refactoring of the quickfix code
Hi, I am attaching a patch to refactor the (hopefully the last one) qf_init_ext() function. This moves the code that parses a line to get the quickfix fields to a separate function. I have also added another quickfix test. - Yegappan -- -- 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. For more options, visit https://groups.google.com/d/optout. diff --git a/src/quickfix.c b/src/quickfix.c index 1145896..ec516a1 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -411,6 +411,11 @@ parse_efm_option(char_u *efm) goto parse_efm_end; /* + * Each part of the format string is copied and modified from errorformat + * to regex prog. Only a few % characters are allowed. + */ + +/* * Get some space to modify the format string into. */ i = (FMT_PATTERNS * 3) + ((int)STRLEN(efm) << 2); @@ -474,7 +479,8 @@ enum { QF_FAIL = 0, QF_OK = 1, QF_END_OF_INPUT = 2, -QF_NOMEM = 3 +QF_NOMEM = 3, +QF_IGNORE_LINE = 4 }; typedef struct { @@ -764,6 +770,324 @@ qf_get_nextline(qfstate_T *state) return QF_OK; } +typedef struct { +char_u *namebuf; +char_u *errmsg; +interrmsglen; +long lnum; +intcol; +char_u use_viscol; +char_u *pattern; +intenr; +inttype; +intvalid; +} qffields_T; + +/* Parse a line and get the quickfix fields */ +static int +qf_parse_line( + qf_info_T *qi, + char_u *linebuf, + int linelen, + efm_T *fmt_first, + qffields_T *fields + ) +{ +efm_T *fmt_ptr; +static efm_T *fmt_start = NULL; /* cached across calls */ +char_u *ptr; +intlen; +inti; +intidx = 0; +char_u *tail = NULL; +regmatch_T regmatch; + +/* Always ignore case when looking for a matching error. */ +regmatch.rm_ic = TRUE; + +/* If there was no %> item start at the first pattern */ +if (fmt_start == NULL) + fmt_ptr = fmt_first; +else +{ + fmt_ptr = fmt_start; + fmt_start = NULL; +} + +/* + * Try to match each part of 'errorformat' until we find a complete + * match or no match. + */ +fields->valid = TRUE; +restofline: +for ( ; fmt_ptr != NULL; fmt_ptr = fmt_ptr->next) +{ + int r; + + idx = fmt_ptr->prefix; + if (qi->qf_multiscan && vim_strchr((char_u *)"OPQ", idx) == NULL) + continue; + fields->namebuf[0] = NUL; + fields->pattern[0] = NUL; + if (!qi->qf_multiscan) + fields->errmsg[0] = NUL; + fields->lnum = 0; + fields->col = 0; + fields->use_viscol = FALSE; + fields->enr = -1; + fields->type = 0; + tail = NULL; + + regmatch.regprog = fmt_ptr->prog; + r = vim_regexec(, linebuf, (colnr_T)0); + fmt_ptr->prog = regmatch.regprog; + if (r) + { + if ((idx == 'C' || idx == 'Z') && !qi->qf_multiline) + continue; + if (vim_strchr((char_u *)"EWI", idx) != NULL) + fields->type = idx; + else + fields->type = 0; + /* +* Extract error message data from matched line. +* We check for an actual submatch, because "\[" and "\]" in +* the 'errorformat' may cause the wrong submatch to be used. +*/ + if ((i = (int)fmt_ptr->addr[0]) > 0)/* %f */ + { + int c; + + if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) + continue; + + /* Expand ~/file and $HOME/file to full path. */ + c = *regmatch.endp[i]; + *regmatch.endp[i] = NUL; + expand_env(regmatch.startp[i], fields->namebuf, CMDBUFFSIZE); + *regmatch.endp[i] = c; + + if (vim_strchr((char_u *)"OPQ", idx) != NULL + && mch_getperm(fields->namebuf) == -1) + continue; + } + if ((i = (int)fmt_ptr->addr[1]) > 0)/* %n */ + { + if (regmatch.startp[i] == NULL) + continue; + fields->enr = (int)atol((char *)regmatch.startp[i]); + } + if ((i = (int)fmt_ptr->addr[2]) > 0)/* %l */ + { + if (regmatch.startp[i] == NULL) + continue; +
Re: Coverage not reported correctly
I wrote: > > I has added a test for Farsi. I can see in the Travis log that the > > tests are executed: > > > > Executing Test_farsi_map() > > xecuting Test_farsi_toggle() > > ... > > Executed 2 tests > > > > However, the reported coverage for src/farsi.c is zero. > > What is wrong here? > > > > I have also noticed zero coverage being reported for main.c. > > It also only lists 290 lines are relevant. Perhaps somehow valid source > > lines are considered not relevant? > > So I changed the build to compile arabic.c and farsi.c separately, instead > of including them from main.c. And now the coverage has increased > dramatically for farsi.c. > > Also look at json.c: The json_encode() function is marked as "missed", > but I'm sure test_json invokes it. > > It definitely looks like there is something fishy about how the > coverage is estimated. I noticed that the new message unittest caused the coverage of the message.c file to drop radically. I assume this is because when running the unittest the file is #included (to access static functions) and this causes the coverage information to be overwritten. I have split the tests in scripttests and unittests. I first only ran the scripttests and now the coverage of main.c makes sense! I now try running unittests before scripttests. If the coverage is indeed overwritten then this should not change the coverage information... Nope, that doesn't work. I'll add a separate target for running the unittests with coverage. Let's see if that works. I have no experience with .travis.yml, please correct me if it can be improved. -- Q: Why do ducks have flat feet? A: To stamp out forest fires. Q: Why do elephants have flat feet? A: To stamp out flaming ducks. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Patch 7.4.2053
Patch 7.4.2053 Problem:Can't run scripttests in the top directory. Solution: Add targets to the top Makefile. Files: Makefile *** ../vim-7.4.2052/Makefile2016-03-19 16:04:11.188238242 +0100 --- Makefile2016-07-16 20:42:15.228342618 +0200 *** *** 32,38 # Some make programs use the last target for the $@ default; put the other # targets separately to always let $@ expand to "first" by default. ! all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean: @if test ! -f src/auto/config.mk; then \ cp src/config.mk.dist src/auto/config.mk; \ fi --- 32,38 # Some make programs use the last target for the $@ default; put the other # targets separately to always let $@ expand to "first" by default. ! all install uninstall tools config configure reconfig proto depend lint tags types test scripttests unittests testclean clean distclean: @if test ! -f src/auto/config.mk; then \ cp src/config.mk.dist src/auto/config.mk; \ fi *** ../vim-7.4.2052/src/version.c 2016-07-16 20:37:42.147101489 +0200 --- src/version.c 2016-07-16 20:42:47.704014447 +0200 *** *** 760,761 --- 760,763 { /* Add new patch number below this line */ + /**/ + 2053, /**/ -- Not too long ago, cut and paste was done with scissors and glue... /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Patch 7.4.2052
Patch 7.4.2052 Problem:Coverage report is messed up by the unittests. Solution: Add a separate test target for script tests. Use that when collecting coverage information. Files: src/Makefile *** ../vim-7.4.2051/src/Makefile2016-07-16 19:49:54.372304144 +0200 --- src/Makefile2016-07-16 20:37:15.759368119 +0200 *** *** 1937,1942 --- 1937,1947 {printf("%s ", $$1)}END{print ""}' > $@ echo "syn keyword Constant OK FAIL TRUE FALSE MAYBE" >> $@ + # TESTING + # + # Execute the test scripts and the unittests. + test check: scripttests unittests + # Execute the test scripts. Run these after compiling Vim, before installing. # This doesn't depend on $(VIMTARGET), because that won't work when configure # wasn't run yet. Restart make to build it instead. *** *** 1948,1954 # If everything is alright, the final message will be "ALL DONE". If not you # get "TEST FAILURE". # ! test check: $(MAKE) -f Makefile $(VIMTARGET) if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \ --- 1953,1959 # If everything is alright, the final message will be "ALL DONE". If not you # get "TEST FAILURE". # ! scripttests: $(MAKE) -f Makefile $(VIMTARGET) if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \ *** *** 1957,1963 ln -s $(VIMTARGET) vim; \ fi cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) ! $(MAKE) -f Makefile unittest # Run the tests with the GUI. Assumes vim/gvim was already built testgui: --- 1962,1968 ln -s $(VIMTARGET) vim; \ fi cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) ! # Run the tests with the GUI. Assumes vim/gvim was already built testgui: *** *** 1969,1974 --- 1974,1980 unittesttargets: $(MAKE) -f Makefile $(UNITTEST_TARGETS) + # Execute the unittests one by one. unittest unittests: $(UNITTEST_TARGETS) @for t in $(UNITTEST_TARGETS); do \ ./$$t || exit 1; echo $$t passed; \ *** ../vim-7.4.2051/src/version.c 2016-07-16 19:49:54.376304103 +0200 --- src/version.c 2016-07-16 20:35:22.012526548 +0200 *** *** 760,761 --- 760,763 { /* Add new patch number below this line */ + /**/ + 2052, /**/ -- Not too long ago, unzipping in public was illegal... /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Functions to get and set the quickfix stack
Hi, There is a patch in the todo list to get and set location list stack: Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14) Second one. Update May 22. Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15. With the recent addition of support for displaying the quickfix/location list stack, what about merging this patch also? - Yegappan -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Got E121: Undefined variable in lambda function
Ken Hamada wrote: > Hi Bram and Ken Takata. > > I think there is some problem in variable substitution of lambda function. > > echo ({y -> ({x -> x(y)(10)})({y -> y})})({z -> z}) > > yields an error `E121: Undefined variable: y`. I expect this expression > yields 10. I tested on Vim 7.4.2048. > > JavaScript: > (function(y){ return (function(x){ return x(y)(10); })(function(y){ return y; > }); })(function(z){ return z; }) > > Python: > (lambda y: (lambda x: x(y)(10))(lambda y: y))(lambda z: z) > > Ruby: > (lambda {|y| (lambda {|x| (x.call(y)).call(10)}).call(lambda {|y| > y})}).call(lambda {|z| z}) > > All these expressions prints 10 as expected. This is because Vim does not support a closure yet. You are using this lambda: {x -> x(y)(10)} You can see that "y" is not defined here. It would come from the context, but that isn't supported. > Anyway, 7.4.2044 is surely a great advance in the history of Vim > script. Thanks. Glad you like it. -- Luxury. We used to have to get out of the lake at three o'clock in the morning, clean the lake, eat a handful of hot gravel, go to work at the mill every day for tuppence a month, come home, and Dad would beat us around the head and neck with a broken bottle, if we were LUCKY! /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Patch 7.4.2051
Patch 7.4.2051 Problem:No proper testing of trunc_string(). Solution: Add a unittest for message.c. Files: src/Makefile, src/message.c, src/message_test.c, src/main.c, src/proto/main.pro, src/structs.h *** ../vim-7.4.2050/src/Makefile2016-07-15 21:24:41.197452549 +0200 --- src/Makefile2016-07-16 19:38:45.643149532 +0200 *** *** 1558,1566 JSON_TEST_TARGET = json_test$(EXEEXT) MEMFILE_TEST_SRC = memfile_test.c MEMFILE_TEST_TARGET = memfile_test$(EXEEXT) ! UNITTEST_SRC = $(JSON_TEST_SRC) $(MEMFILE_TEST_SRC) ! UNITTEST_TARGETS = $(JSON_TEST_TARGET) $(MEMFILE_TEST_TARGET) # All sources, also the ones that are not configured ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC) --- 1558,1568 JSON_TEST_TARGET = json_test$(EXEEXT) MEMFILE_TEST_SRC = memfile_test.c MEMFILE_TEST_TARGET = memfile_test$(EXEEXT) + MESSAGE_TEST_SRC = message_test.c + MESSAGE_TEST_TARGET = message_test$(EXEEXT) ! UNITTEST_SRC = $(JSON_TEST_SRC) $(MEMFILE_TEST_SRC) $(MESSAGE_TEST_SRC) ! UNITTEST_TARGETS = $(JSON_TEST_TARGET) $(MEMFILE_TEST_TARGET) $(MESSAGE_TEST_TARGET) # All sources, also the ones that are not configured ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC) *** *** 1604,1610 objects/mark.o \ objects/memline.o \ objects/menu.o \ - objects/message.o \ objects/misc1.o \ objects/misc2.o \ objects/move.o \ --- 1606,1611 *** *** 1642,1660 $(CHANNEL_OBJ) \ $(WSDEBUG_OBJ) OBJ = $(OBJ_COMMON) \ objects/json.o \ objects/main.o \ ! objects/memfile.o JSON_TEST_OBJ = $(OBJ_COMMON) \ ! objects/json_test.o \ ! objects/memfile.o MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ objects/json.o \ objects/memfile_test.o PRO_AUTO = \ arabic.pro \ blowfish.pro \ --- 1643,1670 $(CHANNEL_OBJ) \ $(WSDEBUG_OBJ) + # The files included by tests are not in OBJ_COMMON. OBJ = $(OBJ_COMMON) \ objects/json.o \ objects/main.o \ ! objects/memfile.o \ ! objects/message.o JSON_TEST_OBJ = $(OBJ_COMMON) \ ! objects/memfile.o \ ! objects/message.o \ ! objects/json_test.o MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ objects/json.o \ + objects/message.o \ objects/memfile_test.o + MESSAGE_TEST_OBJ = $(OBJ_COMMON) \ + objects/json.o \ + objects/memfile.o \ + objects/message_test.o + PRO_AUTO = \ arabic.pro \ blowfish.pro \ *** *** 1970,1975 --- 1980,1988 run_memfile_test: $(MEMFILE_TEST_TARGET) ./$(MEMFILE_TEST_TARGET) + run_message_test: $(MESSAGE_TEST_TARGET) + ./$(MESSAGE_TEST_TARGET) + # Run individual OLD style test, assuming that Vim was already compiled. test1 \ test_autocmd_option \ *** *** 2123,2128 --- 2136,2148 MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ sh $(srcdir)/link.sh + $(MESSAGE_TEST_TARGET): auto/config.mk objects $(MESSAGE_TEST_OBJ) + $(CCC) version.c -o objects/version.o + @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ + -o $(MESSAGE_TEST_TARGET) $(MESSAGE_TEST_OBJ) $(ALL_LIBS)" \ + MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ + sh $(srcdir)/link.sh + # install targets install: $(GUI_INSTALL) *** *** 2941,2946 --- 2961,2969 objects/message.o: message.c $(CCC) -o $@ message.c + objects/message_test.o: message_test.c + $(CCC) -o $@ message_test.c + objects/misc1.o: misc1.c $(CCC) -o $@ misc1.c *** *** 3426,3431 --- 3449,3458 os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \ structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \ ex_cmds.h proto.h globals.h farsi.h arabic.h memfile.c + objects/message_test.o: message_test.c main.c vim.h auto/config.h feature.h \ + os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \ + structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \ + ex_cmds.h proto.h globals.h farsi.h arabic.h message.c objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \ *** ../vim-7.4.2050/src/message.c 2016-07-16 16:54:18.334699590 +0200 --- src/message.c 2016-07-16 19:36:06.884780592 +0200 *** *** 260,266 return; } n = ptr2cells(s + e); ! if (len + n >= half) break; len += n; buf[e] = s[e]; --- 260,266 return; } n = ptr2cells(s + e); ! if (len + n > half)
Patch 7.4.2050
Patch 7.4.2050 Problem:When using ":vimgrep" may end up with duplicate buffers. Solution: When adding an error list entry pass the buffer number if possible. Files: src/quickfix.c, src/testdir/test_quickfix.vim *** ../vim-7.4.2049/src/quickfix.c 2016-07-16 16:54:18.330699629 +0200 --- src/quickfix.c 2016-07-16 18:24:29.268513435 +0200 *** *** 1581,1587 static bufref_T qf_last_bufref = {NULL, 0}; /* ! * Get buffer number for file "dir.name". * Also sets the b_has_qf_entry flag. */ static int --- 1581,1587 static bufref_T qf_last_bufref = {NULL, 0}; /* ! * Get buffer number for file "directory.fname". * Also sets the b_has_qf_entry flag. */ static int *** *** 4109,4119 while (vim_regexec_multi(, curwin, buf, lnum, col, NULL) > 0) { ! ; if (qf_add_entry(qi, NULL, /* dir */ fname, ! 0, ml_get_buf(buf, regmatch.startpos[0].lnum + lnum, FALSE), regmatch.startpos[0].lnum + lnum, --- 4109,4121 while (vim_regexec_multi(, curwin, buf, lnum, col, NULL) > 0) { ! /* Pass the buffer number so that it gets used even for a !* dummy buffer, unless duplicate_name is set, then the !* buffer will be wiped out below. */ if (qf_add_entry(qi, NULL, /* dir */ fname, ! duplicate_name ? 0 : buf->b_fnum, ml_get_buf(buf, regmatch.startpos[0].lnum + lnum, FALSE), regmatch.startpos[0].lnum + lnum, *** *** 4177,4188 --- 4179,4195 else if (buf != first_match_buf || (flags & VGR_NOJUMP)) { unload_dummy_buffer(buf, dirname_start); + /* Keeping the buffer, remove the dummy flag. */ + buf->b_flags &= ~BF_DUMMY; buf = NULL; } } if (buf != NULL) { + /* Keeping the buffer, remove the dummy flag. */ + buf->b_flags &= ~BF_DUMMY; + /* If the buffer is still loaded we need to use the * directory we jumped to below. */ if (buf == first_match_buf *** ../vim-7.4.2049/src/testdir/test_quickfix.vim 2016-07-16 16:54:18.338699549 +0200 --- src/testdir/test_quickfix.vim 2016-07-16 18:05:01.376283846 +0200 *** *** 1462,1464 --- 1462,1479 call HistoryTest('c') call HistoryTest('l') endfunc + + func Test_duplicate_buf() + " make sure we can get the highest buffer number + edit DoesNotExist + edit DoesNotExist2 + let last_buffer = bufnr("$") + + " make sure only one buffer is created + call writefile(['this one', 'that one'], 'Xgrepthis') + vimgrep one Xgrepthis + vimgrep one Xgrepthis + call assert_equal(last_buffer + 1, bufnr("$")) + + call delete('Xgrepthis') + endfunc *** ../vim-7.4.2049/src/version.c 2016-07-16 16:54:18.338699549 +0200 --- src/version.c 2016-07-16 17:36:56.217175177 +0200 *** *** 760,761 --- 760,763 { /* Add new patch number below this line */ + /**/ + 2050, /**/ -- You were lucky. We lived for three months in a brown paper bag in a septic tank. We used to have to get up at six o'clock in the morning, clean the bag, eat a crust of stale bread, go to work down mill for fourteen hours a day week in-week out. When we got home, our Dad would thrash us to sleep with his belt! /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Patch 7.4.2049
Patch 7.4.2049 Problem:There is no way to get a list of the error lists. Solution: Add ":chistory" and ":lhistory". Files: src/ex_cmds.h, src/quickfix.c, src/ex_docmd.c, src/message.c, src/proto/quickfix.pro, src/testdir/test_quickfix.vim *** ../vim-7.4.2048/src/ex_cmds.h 2016-07-09 17:55:24.902980302 +0200 --- src/ex_cmds.h 2016-07-16 15:05:59.091544898 +0200 *** *** 310,315 --- 310,318 EX(CMD_checktime, "checktime",ex_checktime, RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR, ADDR_LINES), + EX(CMD_chistory, "chistory", qf_history, + TRLBAR, + ADDR_LINES), EX(CMD_clist, "clist",qf_list, BANG|EXTRA|TRLBAR|CMDWIN, ADDR_LINES), *** *** 784,789 --- 787,795 EX(CMD_lhelpgrep, "lhelpgrep",ex_helpgrep, EXTRA|NOTRLCOM|NEEDARG, ADDR_LINES), + EX(CMD_lhistory, "lhistory", qf_history, + TRLBAR, + ADDR_LINES), EX(CMD_ll,"ll", ex_cc, RANGE|NOTADR|COUNT|TRLBAR|BANG, ADDR_LINES), *** ../vim-7.4.2048/src/quickfix.c 2016-07-16 14:20:39.871128402 +0200 --- src/quickfix.c 2016-07-16 15:52:36.551749815 +0200 *** *** 120,126 static void ll_free_all(qf_info_T **pqi); static intqf_add_entry(qf_info_T *qi, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid); static qf_info_T *ll_new_list(void); - static void qf_msg(qf_info_T *qi); static void qf_free(qf_info_T *qi, int idx); static char_u *qf_types(int, int); static intqf_get_fnum(qf_info_T *qi, char_u *, char_u *); --- 120,125 *** *** 2544,2549 --- 2543,2571 buf[i] = NUL; } + static void + qf_msg(qf_info_T *qi, int which, char *lead) + { + char *title = (char *)qi->qf_lists[which].qf_title; + intcount = qi->qf_lists[which].qf_count; + char_u buf[IOSIZE]; + + vim_snprintf((char *)buf, IOSIZE, _("%serror list %d of %d; %d errors "), + lead, + which + 1, + qi->qf_listcount, + count); + + if (title != NULL) + { + while (STRLEN(buf) < 34) + STRCAT(buf, " "); + STRCAT(buf, title); + } + trunc_string(buf, buf, Columns - 1, IOSIZE); + msg(buf); + } + /* * ":colder [count]": Up in the quickfix stack. * ":cnewer [count]": Down in the quickfix stack. *** *** 2591,2610 ++qi->qf_curlist; } } ! qf_msg(qi); ! } ! ! static void ! qf_msg(qf_info_T *qi) ! { ! smsg((char_u *)_("error list %d of %d; %d errors"), ! qi->qf_curlist + 1, qi->qf_listcount, ! qi->qf_lists[qi->qf_curlist].qf_count); #ifdef FEAT_WINDOWS qf_update_buffer(qi, NULL); #endif } /* * Free error list "idx". */ --- 2613,2640 ++qi->qf_curlist; } } ! qf_msg(qi, qi->qf_curlist, ""); #ifdef FEAT_WINDOWS qf_update_buffer(qi, NULL); #endif } + void + qf_history(exarg_T *eap) + { + qf_info_T *qi = _info; + int i; + + if (eap->cmdidx == CMD_lhistory) + qi = GET_LOC_LIST(curwin); + if (qi == NULL || (qi->qf_listcount == 0 + && qi->qf_lists[qi->qf_curlist].qf_count == 0)) + MSG(_("No entries")); + else + for (i = 0; i < qi->qf_listcount; ++i) + qf_msg(qi, i, i == qi->qf_curlist ? "> " : " "); + } + /* * Free error list "idx". */ *** ../vim-7.4.2048/src/ex_docmd.c 2016-07-16 14:46:51.123240668 +0200 --- src/ex_docmd.c 2016-07-16 15:06:36.259177513 +0200 *** *** 122,127 --- 122,128 # define ex_cfile ex_ni # define qf_list ex_ni # define qf_age ex_ni + # define qf_history ex_ni # define ex_helpgrep ex_ni # define ex_vimgrep ex_ni #endif *** ../vim-7.4.2048/src/message.c 2016-07-12 21:11:28.711223556 +0200 --- src/message.c 2016-07-16 16:23:29.289072151 +0200 *** *** 313,321 len += n; } ! /* Set the middle and copy the last part. */ ! if (e + 3 < buflen) { mch_memmove(buf + e, "...", (size_t)3); len = (int)STRLEN(s + i) + 1; if (len >= buflen - e - 3) --- 313,337 len += n; } ! ! if (i <= e + 3) ! { ! /* text fits without truncating */ ! if (s != buf) ! { ! len = STRLEN(s); ! if (len >= buflen) ! len = buflen - 1; ! len = len - e + 1; ! if (len < 1) ! buf[e
Re: Patch 7.4.2048
Hi Bram and list, 2016-7-16(Sat) 21:48:04 UTC+9 Bram Moolenaar: > Patch 7.4.2048 > Problem:There is still code and help for unsupported systems. > Solution: Remove the code and text. (Hirohito Higashi) > Files: runtime/doc/eval.txt, runtime/lang/menu_sk_sk.vim, > runtime/menu.vim, runtime/optwin.vim, src/Make_bc5.mak, > src/ex_docmd.c, src/feature.h, src/fileio.c, src/globals.h, > src/main.c, src/memfile.c, src/memline.c, src/misc1.c, > src/misc2.c, src/option.c, src/option.h, src/os_unix.c, > src/os_unix.h, src/proto.h, src/term.c, src/undo.c, src/version.c, > src/vim.h, src/xxd/xxd.c > *** > *** 4102,4110 > int tmode = cur_tmode; > #ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */ > int x; > - # ifndef __EMX__ > - char_u *newcmd; /* only needed for unix */ > - # else > /* >* Set the preferred shell in the EMXSHELL environment variable (but >* only if it is different from what is already in the environment). > --- 4071,4076 > *** > *** 4125,4131 > putenv((char *)p); /* don't free the pointer! */ > } > } > - # endif Sorry, I have a mistake. Avobe modified was wrong. # ifndef __EMX__ SECTION_A # else SECTION_B # endif I removed SECTION_A. But, It was really SECTION_B such is given should be deleted. I wrote a patch. Please fix this. -- Best regards, Hirohito Higashi (a.k.a. h_east) -- -- 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. For more options, visit https://groups.google.com/d/optout. diff --git a/src/os_unix.c b/src/os_unix.c index df39cd3..9e53318 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4070,27 +4070,7 @@ mch_call_shell( #endif int tmode = cur_tmode; #ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */ -int x; -/* - * Set the preferred shell in the EMXSHELL environment variable (but - * only if it is different from what is already in the environment). - * Emx then takes care of whether to use "/c" or "-c" in an - * intelligent way. Simply pass the whole thing to emx's system() call. - * Emx also starts an interactive shell if system() is passed an empty - * string. - */ -char_u *p, *old; - -if (((old = (char_u *)getenv("EMXSHELL")) == NULL) || STRCMP(old, p_sh)) -{ - /* should check HAVE_SETENV, but I know we don't have it. */ - p = alloc(10 + strlen(p_sh)); - if (p) - { - sprintf((char *)p, "EMXSHELL=%s", p_sh); - putenv((char *)p); /* don't free the pointer! */ - } -} +char_u *newcmd; /* only needed for unix */ out_flush();
Got E121: Undefined variable in lambda function
Hi Bram and Ken Takata. I think there is some problem in variable substitution of lambda function. echo ({y -> ({x -> x(y)(10)})({y -> y})})({z -> z}) yields an error `E121: Undefined variable: y`. I expect this expression yields 10. I tested on Vim 7.4.2048. JavaScript: (function(y){ return (function(x){ return x(y)(10); })(function(y){ return y; }); })(function(z){ return z; }) Python: (lambda y: (lambda x: x(y)(10))(lambda y: y))(lambda z: z) Ruby: (lambda {|y| (lambda {|x| (x.call(y)).call(10)}).call(lambda {|y| y})}).call(lambda {|z| z}) All these expressions prints 10 as expected. Anyway, 7.4.2044 is surely a great advance in the history of Vim script. Thanks. Sincerely, Ken Hamada -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Asynchronous grep plugin - thoughts and issues
Ramel Eshed wrote: > 1) Actually, there is a bug here which is not exactly what I've > described earlier. The issue is that :call setqflist([]), instead of > adding one more list after the last list, will clear the next list and > delete the ones after. For example: let's say I used :grep 4 times so > I have now 4 lists. Now, if I do :colder 3, the first list becomes the > current list. :call setqflist([]) will empty list 2, and delete lists > 3 and 4. Looking into this again, this is intended behavior. The problem is that you can't easily see an overview of the error lists. I'll add the :chistory command for that. The help explains this: When ":colder" has been used and ":make" or ":grep" is used to add a new error list, one newer list is overwritten. This is especially useful if you are browsing with ":grep" |grep|. If you want to keep the more recent error lists, use ":cnewer 99" first. You can also use setqflist([], 'r') to clear one error list. -- You were lucky to have a LAKE! There were a hundred and sixty of us living in a small shoebox in the middle of the road. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Patch 7.4.2048
Patch 7.4.2048 Problem:There is still code and help for unsupported systems. Solution: Remove the code and text. (Hirohito Higashi) Files: runtime/doc/eval.txt, runtime/lang/menu_sk_sk.vim, runtime/menu.vim, runtime/optwin.vim, src/Make_bc5.mak, src/ex_docmd.c, src/feature.h, src/fileio.c, src/globals.h, src/main.c, src/memfile.c, src/memline.c, src/misc1.c, src/misc2.c, src/option.c, src/option.h, src/os_unix.c, src/os_unix.h, src/proto.h, src/term.c, src/undo.c, src/version.c, src/vim.h, src/xxd/xxd.c *** ../vim-7.4.2047/runtime/doc/eval.txt2016-07-15 21:24:41.185452723 +0200 --- runtime/doc/eval.txt2016-07-16 14:33:33.435016351 +0200 *** *** 7798,7810 digraphs Compiled with support for digraphs. directx Compiled with support for Direct-X and 'renderoptions'. dnd Compiled with support for the "~ register |quote_~|. - dos16 16 bits DOS version of Vim. - dos32 32 bits DOS (DJGPP) version of Vim. ebcdicCompiled on a machine with ebcdic character set. emacs_tagsCompiled with support for Emacs tags. eval Compiled with expression evaluation support. Always true, of course! ! ex_extra Compiled with extra Ex commands |+ex_extra|. extra_search Compiled with support for |'incsearch'| and |'hlsearch'| farsi Compiled with Farsi support |farsi|. --- 7934,7944 digraphs Compiled with support for digraphs. directx Compiled with support for Direct-X and 'renderoptions'. dnd Compiled with support for the "~ register |quote_~|. ebcdicCompiled on a machine with ebcdic character set. emacs_tagsCompiled with support for Emacs tags. eval Compiled with expression evaluation support. Always true, of course! ! ex_extra |+ex_extra|, always true now extra_search Compiled with support for |'incsearch'| and |'hlsearch'| farsi Compiled with Farsi support |farsi|. *** *** 7847,7853 and the argument list |arglist|. localmap Compiled with local mappings and abbr. |:map-local| lua Compiled with Lua interface |Lua|. ! mac Macintosh version of Vim. macunix Compiled for OS X, with darwin osx Compiled for OS X, with or without darwin menu Compiled with support for |:menu|. --- 7981,7987 and the argument list |arglist|. localmap Compiled with local mappings and abbr. |:map-local| lua Compiled with Lua interface |Lua|. ! mac Any Macintosh version of Vim. macunix Compiled for OS X, with darwin osx Compiled for OS X, with or without darwin menu Compiled with support for |:menu|. *** *** 7872,7878 netbeans_intg Compiled with support for |netbeans|. num64 Compiled with 64-bit |Number| support. ole Compiled with OLE automation support for Win32. - os2 OS/2 version of Vim. packages Compiled with |packages| support. path_extraCompiled with up/downwards search in 'path' and 'tags' perl Compiled with Perl interface. --- 8006,8011 *** *** 7891,7897 showcmd Compiled with 'showcmd' support. signs Compiled with |:sign| support. smartindent Compiled with 'smartindent' support. - sniff Compiled with SNiFF interface support. spell Compiled with spell checking support |spell|. startuptime Compiled with |--startuptime| support. statuslineCompiled with support for 'statusline', 'rulerformat' --- 8024,8029 *** *** 7908,7924 --- 8040,8059 tag_any_white Compiled with support for any white characters in tags files |tag-any-white|. tcl Compiled with Tcl interface. + termguicolors Compiled with true color in terminal support. terminfo Compiled with terminfo instead of termcap. termresponse Compiled with support for |t_RV| and |v:termresponse|. textobjects Compiled with support for |text-objects|. tgetent Compiled with tgetent support, able to use a termcap or terminfo file. + timersCompiled with |timer_start()| support. title
Re: [doc][patch] fix alignment of the function list
Ken Takata wrote: > Attached patch fixes alignment of the function list. > Also fixes mixture of spaces and tabs. Thanks. -- Just think of all the things we haven't thought of yet. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Re: [patch] Add constans for type()
Ken Takata wrote: > The help of type() says: > > To avoid the magic numbers it should be used this way: > > :if type(myvar) == type(0) > :if type(myvar) == type("") > :if type(myvar) == type(function("tr")) > :if type(myvar) == type([]) > :if type(myvar) == type({}) > :if type(myvar) == type(0.0) > :if type(myvar) == type(v:false) > :if type(myvar) == type(v:none) > > But I don't think this is easy to understand. More badly, we don't have a way > to get the constants for Job and Channel; we need to use the magic numbers for > them. Attached patch adds constants for them: > v:t_number, v:t_string, ..., v:t_job and v:t_channel > > What do you think? I like it. -- CONCORDE: Message for you, sir. He falls forward revealing the arrow with the note. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Re: [patch] Fix compiler warning in quickfix.c
Anton Lindqvist wrote: > Hi, > Compiling commit e0d3797 with GCC and -pedantic gives the following > warning: > > quickfix.c: In function 'qf_init_ext': > quickfix.c:795: warning: initializer element is not computable at load time > quickfix.c:795: warning: initializer element is not computable at load time > > Attached is a patch that gets rid of this warning. I thought this way was OK. But we don't want warnings. -- "To whoever finds this note - I have been imprisoned by my father who wishes me to marry against my will. Please please please please come and rescue me. I am in the tall tower of Swamp Castle." SIR LAUNCELOT's eyes light up with holy inspiration. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Patch 7.4.2047
Patch 7.4.2047 Problem:Compiler warning for initializing a struct. Solution: Initialize in another way. (Anton Lindqvist) Files: src/quickfix.c *** ../vim-7.4.2046/src/quickfix.c 2016-07-15 22:35:54.823345060 +0200 --- src/quickfix.c 2016-07-16 14:04:42.519169942 +0200 *** *** 792,798 int errmsglen; char_u*pattern; qfstate_T state = {NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, !NULL, lnumfirst, lnumlast}; int col = 0; char_uuse_viscol = FALSE; int type = 0; --- 792,798 int errmsglen; char_u*pattern; qfstate_T state = {NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, !NULL, 0, 0}; int col = 0; char_uuse_viscol = FALSE; int type = 0; *** *** 903,908 --- 903,910 state.tv = tv; } state.buf = buf; + state.buflnum = lnumfirst; + state.lnumlast = lnumlast; /* * Read the lines in the error file one by one. *** ../vim-7.4.2046/src/version.c 2016-07-15 22:35:54.827345002 +0200 --- src/version.c 2016-07-16 14:18:11.564618863 +0200 *** *** 760,761 --- 760,763 { /* Add new patch number below this line */ + /**/ + 2047, /**/ -- Even got a Datapoint 3600(?) with a DD50 connector instead of the usual DB25... what a nightmare trying to figure out the pinout for *that* with no spex... /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\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. For more options, visit https://groups.google.com/d/optout.
Re: [vim/vim] Is it very difficult to hide cmd window when calling 'system()' on windows ? (#922)
char101: > I have created a proof-of-concept plugin that hide the console window using > api hooking. > > https://github.com/char101/vim-hidecmd/ > that's great !! thanks -- -- 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. For more options, visit https://groups.google.com/d/optout.
[patch] Fix compiler warning in quickfix.c
Hi, Compiling commit e0d3797 with GCC and -pedantic gives the following warning: quickfix.c: In function 'qf_init_ext': quickfix.c:795: warning: initializer element is not computable at load time quickfix.c:795: warning: initializer element is not computable at load time Attached is a patch that gets rid of this warning. -- :wq -- -- 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. For more options, visit https://groups.google.com/d/optout. diff --git a/src/quickfix.c b/src/quickfix.c index 4be1d91..fa76e5d 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -792,7 +792,7 @@ qf_init_ext( interrmsglen; char_u *pattern; qfstate_T state = {NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, -NULL, lnumfirst, lnumlast}; +NULL, 0, 0}; intcol = 0; char_u use_viscol = FALSE; inttype = 0; @@ -816,6 +816,8 @@ qf_init_ext( char_u *tail = NULL; regmatch_T regmatch; +state.buflnum = lnumfirst; +state.lnumlast = lnumlast; namebuf = alloc_id(CMDBUFFSIZE + 1, aid_qf_namebuf); errmsglen = CMDBUFFSIZE + 1; errmsg = alloc_id(errmsglen, aid_qf_errmsg);
Re: [vim/vim] Is it very difficult to hide cmd window when calling 'system()' on windows ? (#922)
I have created a proof-of-concept plugin that hide the console window using api hooking. https://github.com/char101/vim-hidecmd/ On Fri, Jul 15, 2016 at 8:18 PM, Charleswrote: > An alternative way without the need to modify vim is to create an > application that hook the CreateProcess function and modify the window > flags. It can be written e.g. in Python using the deviare library. > > On Fri, Jul 15, 2016, 1:33 PM skywind3000 wrote: > >> Bram: >> >> > I'm not sure if that can be made to work. CTRL-Break sometimes behaves >> > strange. >> > >> > On Unix you would use "kill" to stop the process. On MS-Windows you can >> > use the task manager for this, right? >> > >> > In general I don't mind the flickering, it's feedback that something is >> > happening. (I liked to hear my harddisk rattling, to know how busy it >> > is, SSDs broke that. I liked to hear my modem produce noise, so that I >> > knew what was going over the line. Now I have fiber...). >> > >> >> Yes, ctrl_break is not important, we can stop process by `kill` or `task >> manager`. >> >> I like the modem noise in the old days too, but these feedbacks are sound >> feedback, not graphics feedbacks. >> >> We can see windows users asking for help to hide the cmd window, they >> need to focus on editing, and solutions are everywhere including patch of >> os_win32.c, python/perl script to emulate unix `system()` experience for >> vim. But none of these are perfect (depend on python or need modify >> official source code). >> >> Can we get the ability to choose what ever we like ? >> Could windows gvim users have an option to enable SW_HIDE in `system()` ? >> >> -- >> -- >> 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. >> For more options, visit https://groups.google.com/d/optout. >> > -- -- 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. For more options, visit https://groups.google.com/d/optout.