Re: Matching decomposable Unicode characters
Ron Aaron wrote: > I was puzzled when searching for this in some Hebrew text: > > /ארבע\Z/ > > That it did not match this: > > אַרְבָּעָה > > As it happens, the אַ is Unicode combined form of the aleph plus the > vowel patah. > > There are two issues: > > 1) First, is that the normal user would expect a match here, since the > symbols are semantically the same (even though Unicode bizarrely > assigns a separate symbol for the combined vowel+consonant) > > 2) The original file is CP1255 encoded, and my enc is set to UTF8, so > the file is converted to UTF8 on read. This is desired, but the > conversion engine (in this case GNU iconv) is being more helpful than > it should be. I don't know what to do about this. > > The first issue can (and should) be dealt with in Vim, probably with > an option to "decompose multibyte". I find it a bit annoying that Unicode has two forms for the same character. They should have made a choice to either use a base character plus composing characters, or the combined form. Now we need to solve this in software everywhere. > It may be that Vim's internal iconv functions are better? Any ideas? Perhaps iconv has a way to specify decomposing characters? But we don't want to convert everything. I suppose decomposing is not an algorithm but a matter of a very big table. -- Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Cha-Chu. But I think it's Colin. /// 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/groups/opt_out.
Re: Python changes, crash in tests
ZyX wrote: > > Patch 7.3.1044 adds the .valid field, but there still is no > > documentation for it. > > # HG changeset patch > # User ZyX > # Date 1369975224 -14400 > # Branch python-extended-4 > # Node ID b61c8091e71698a072a0106e550d05ae17e8 > # Parent bca5a13b9afd2d9b648c8239696753f663f09147 > Add missing documentation Thanks! -- The technology involved in making anything invisible is so infinitely complex that nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine times out of a trillion it is much simpler and more effective just to take the thing away and do without it. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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/groups/opt_out.
Re: Python changes, crash in tests
ZyX wrote: > пятница, 31 мая 2013 г., 0:06:49 UTC+4 пользователь Bram Moolenaar написал: > > ZyX wrote: > > > > > > > > > And this one fixes tests. And I still do not have any memory access > > > errors, probably they were fixed by the previous posted diff. Some > > > memory leaks are there, but nothing marked �definitely lost� in > > > my code: > > > > Memory lost in x11 functions is not our problem. > > > > > Fix SystemErrors by adding RAISE_NO_EMPTY_KEYS in proper places; purge > > > DICTKEY_* macros > > > > I still see a big difference between the output and what is supposed to > > be the output. > > > > In test86 output lines 757 to 1075 are missing. It's like some part of > > the test didn't run. > > Cannot say anything without more details. On my system tests work > perfectly with python-2.7. Python-2.6 has some minor differences in > output; python-2.3 has some major differences due to different repr() > of built-in exceptions. Nothing is missing part of the test, > especially such weird one. I'll include the diff below. I'm using Python 2.7.3, as it's on Ubuntu 12.10. Lots of people must be using this. I hope we can make the code not depend on the specific Python version as much as possible. Not only for the tests, also for users who write scripts. I know it's not at all easy to do this, but we can try. > > In test87 there are a few errors in several lines. E.g. getting > > "SyntaxError" instead of "TypeError". > > These are fixed with this patch: Together with the other patch ":py" -> ":py3" only a few errors remain. See the diff in the attachment. -- This planet has -- or rather had -- a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movements of small green pieces of paper, which is odd because on the whole it wasn't the small green pieces of paper that were unhappy. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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/groups/opt_out. diff Description: Binary data
Re: Matching decomposable Unicode characters
Christian Brabandt wrote: > On Fr, 31 Mai 2013, Ron Aaron wrote: > > > I think there should be an option (probably an option, not a regex > > flag) which controls whether or not the engine finds "ff" (unicode > > 0xfb00) when searching for "f", for example. It seems to me that > > most people may not need it, but those of us who frequently edit > > multilingual or other rich texts, encounter the need quite often. > > > > Searching (in the above example) for "ff" should only find "ff", but > > searching for "f" should also find it (if the option were enabled). > > Wouldn't it be enough, if we enhance the equivalence classes a bit? I > have posted a patch, which enhances the equivalence classes a while ago. > It didn't include U+FB00, but I think, we could easily add the missing > chars. And we would need a flag like \Z that tells the regexp to use equivalence classes for every character. Otherwise typing the regexp is very clumsy. It would be an expensive flag (slow) but that's a small price to pay if you need to search this way. -- 'Well, here's something to occupy you and keep your mind off things.' 'It won't work, I have an exceptionally large mind.' -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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/groups/opt_out.
Re: Matching decomposable Unicode characters
Ron Aaron wrote: > On Friday, May 31, 2013 12:27:21 PM UTC+3, Bram Moolenaar wrote: > > > I find it a bit annoying that Unicode has two forms for the same character. > > They should have made a choice to either use a base character plus composing > > characters, or the combined form. Now we need to solve this in software > > everywhere. > > Believe me, you're not the only one who finds it annoying! > > > Perhaps iconv has a way to specify decomposing characters? > > But we don't want to convert everything. > > I didn't see any way, but maybe someone else knows? > > > I suppose decomposing is not an algorithm but a matter of a very big > > table. > > Yes, though perhaps not such a big table. It's just the "equivalence" > characters. Hmm... actually there are a number of those, aren't > there? Not just Hebrew but combined Latin chars as well. AGH. > > I could solve the problem for Hebrew, specifically, with a small > table. But I assume that would not be a solution you would favor. It's OK to have a table, if it can be generated from the tables that Unicode publishes. We already have $VIMRUNTIME/tools/unicode.vim I suppose what we want is to decompose characters, then we can use \Z to ignore composing characters. So we would use the decomposed form as a kind of normalization. Doing it the other way around doesn't sound very useful, and doesn't work when the composed character does not exist. Note that this would also work for Latin characters, and in effect you get something similar to character classes. So any "e" with an accent that is one character would become an "e" with a composing character, and then adding \Z makes the composing character be ignored. -- What a wonderfully exciting cough! Do you mind if I join you? -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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/groups/opt_out.
Re: fix: py3xxx commands completion
Taro Muraoka wrote: > Vim can't complete commands which starts with 'py3' > when typing ':py3' in command line. > > I wrote a patch: https://gist.github.com/koron/5685200 > > Please check it. Thanks, this was a known problem. -- "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" "I don't know, I didn't listen!" -- Arthur Dent and Ford Prefect in Douglas Adams' "The Hitchhiker's Guide to the Galaxy" /// 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/groups/opt_out.
Patch 7.3.1079
ot;abc" : {%s : 1}})]) l.extend([Mapping({"abc" : {1 : 1}})]):(, TypeError('object must be string',)) ! l.extend([Mapping({"abc" : {u"\0" : 1}})]):(, TypeError('expected bytes with no null',)) l.extend([Mapping({"abc" : {"\0" : 1}})]):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing StringToChars using l.extend([Mapping({"abc" : Mapping({%s : 1})})]) l.extend([Mapping({"abc" : Mapping({1 : 1})})]):(, TypeError('object must be string',)) ! l.extend([Mapping({"abc" : Mapping({u"\0" : 1})})]):(, TypeError('expected bytes with no null',)) l.extend([Mapping({"abc" : Mapping({"\0" : 1})})]):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing *Iter* using l.extend([Mapping({"abc" : %s})]) --- 837,853 <<< Finished >>> Testing StringToChars using l.extend([Mapping({%s : 1})]) l.extend([Mapping({1 : 1})]):(, TypeError('object must be string',)) ! l.extend([Mapping({b"\0" : 1})]):(, TypeError('expected bytes with no null',)) l.extend([Mapping({"\0" : 1})]):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing StringToChars using l.extend([Mapping({"abc" : {%s : 1}})]) l.extend([Mapping({"abc" : {1 : 1}})]):(, TypeError('object must be string',)) ! l.extend([Mapping({"abc" : {b"\0" : 1}})]):(, TypeError('expected bytes with no null',)) l.extend([Mapping({"abc" : {"\0" : 1}})]):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing StringToChars using l.extend([Mapping({"abc" : Mapping({%s : 1})})]) l.extend([Mapping({"abc" : Mapping({1 : 1})})]):(, TypeError('object must be string',)) ! l.extend([Mapping({"abc" : Mapping({b"\0" : 1})})]):(, TypeError('expected bytes with no null',)) l.extend([Mapping({"abc" : Mapping({"\0" : 1})})]):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing *Iter* using l.extend([Mapping({"abc" : %s})]) *** *** 882,898 >> FunctionCall >>> Testing StringToChars using f({%s : 1}) f({1 : 1}):(, TypeError('object must be string',)) ! f({u"\0" : 1}):(, TypeError('expected bytes with no null',)) f({"\0" : 1}):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing StringToChars using f({"abc" : {%s : 1}}) f({"abc" : {1 : 1}}):(, TypeError('object must be string',)) ! f({"abc" : {u"\0" : 1}}):(, TypeError('expected bytes with no null',)) f({"abc" : {"\0" : 1}}):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing StringToChars using f({"abc" : Mapping({%s : 1})}) f({"abc" : Mapping({1 : 1})}):(, TypeError('object must be string',)) ! f({"abc" : Mapping({u"\0" : 1})}):(, TypeError('expected bytes with no null',)) f({"abc" : Mapping({"\0" : 1})}):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing *Iter* using f({"abc" : %s}) --- 882,898 >> FunctionCall >>> Testing StringToChars using f({%s : 1}) f({1 : 1}):(, TypeError('object must be string',)) ! f({b"\0" : 1}):(, TypeError('expected bytes with no null',)) f({"\0" : 1}):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing StringToChars using f({"abc" : {%s : 1}}) f({"abc" : {1 : 1}}):(, TypeError('object must be string',)) ! f({"abc" : {b"\0" : 1}}):(, TypeError('expected bytes with no null',)) f({"abc" : {"\0" : 1}}):(, TypeError('expected bytes with no null',)) <<< Finished >>> Testing Str
Patch 7.3.1080
x27;vim.current.buffer.append(["\\na", "bc"])') ee('vim.current.buffer.append("\\nbc")') cb.append(">> RBItem") ! ee('vim.current.buffer[1]') cb.append(">> RBAsItem") ! ee('vim.current.buffer[1] = ""') cb.append(">> BufferAttr") ee('vim.current.buffer.xxx') cb.append(">> BufferSetattr") *** ../vim-7.3.1079/src/testdir/test86.ok 2013-05-30 13:37:23.0 +0200 --- src/testdir/test86.ok 2013-05-31 18:59:34.0 +0200 *** *** 439,448 >> OutputWriteLines sys.stdout.writelines(None):(, TypeError("'NoneType' object is not iterable",)) sys.stdout.writelines([1]):(, TypeError('writelines() requires list of strings',)) - >>> Testing *Iter* using sys.stdout.writelines(%s) - sys.stdout.writelines(FailingIter()):(, NotImplementedError()) - sys.stdout.writelines(FailingIterNext()):(, NotImplementedError()) - <<< Finished > VimCommand vim.command(1):(, TypeError('must be string, not int',)) > VimToPython --- 439,444 *** *** 544,553 >>> iter d.update(FailingMapping()):(, NotImplementedError()) d.update([FailingIterNext()]):(, NotImplementedError()) - >>> Testing *Iter* using d.update(%s) - d.update(FailingIter()):(, NotImplementedError()) - d.update(FailingIterNext()):(, NotImplementedError()) - <<< Finished >>> Testing StringToChars using d.update({%s : 1}) d.update({1 : 1}):(, TypeError('object must be string',)) d.update({u"\0" : 1}):(, TypeError('expected string without null bytes',)) --- 540,545 *** *** 681,690 >> ListConstructor vim.List(1, 2):(, TypeError('function takes at most 1 argument (2 given)',)) vim.List(a=1):(, TypeError('list constructor does not accept keyword arguments',)) - >>> Testing *Iter* using vim.List(%s) - vim.List(FailingIter()):(, NotImplementedError()) - vim.List(FailingIterNext()):(, NotImplementedError()) - <<< Finished >>> Testing StringToChars using vim.List([{%s : 1}]) vim.List([{1 : 1}]):(, TypeError('object must be string',)) vim.List([{u"\0" : 1}]):(, TypeError('expected string without null bytes',)) --- 673,678 *** *** 752,761 l[1000] = 3:(, IndexError('list index out of range',)) >> ListAssSlice ll[1:100] = "abc":(, error('list is locked',)) - >>> Testing *Iter* using l[:] = %s - l[:] = FailingIter():(, NotImplementedError()) - l[:] = FailingIterNext():(, NotImplementedError()) - <<< Finished >>> Testing StringToChars using l[:] = [{%s : 1}] l[:] = [{1 : 1}]:(, TypeError('object must be string',)) l[:] = [{u"\0" : 1}]:(, TypeError('expected string without null bytes',)) --- 740,745 *** *** 817,826 l[:] = [FailingMappingKey()]:(, NotImplementedError()) <<< Finished >> ListConcatInPlace - >>> Testing *Iter* using l.extend(%s) - l.extend(FailingIter()):(, NotImplementedError()) - l.extend(FailingIterNext()):(, NotImplementedError()) - <<< Finished >>> Testing StringToChars using l.extend([{%s : 1}]) l.extend([{1 : 1}]):(, TypeError('object must be string',)) l.extend([{u"\0" : 1}]):(, TypeError('expected string without null bytes',)) --- 801,806 *** *** 1025,1031 vim.current.window.xxx:(, AttributeError('xxx',)) >> WindowSetattr vim.current.window.buffer = 0:(, TypeError('readonly attribute',)) ! vim.current.window.cursor = (100, 1):(, error('cursor position outside buffer',)) vim.current.window.cursor = True:(, TypeError('argument must be 2-item sequence, not bool',)) vim.current.window.height = "abc":(, TypeError('an integer is required',)) vim.current.window.width = "abc":(, TypeError('an integer is required',)) --- 1005,1011 vim.current.window.xxx:(, AttributeError('xxx',)) >> WindowSetattr vim.current.window.buffer = 0:(, TypeError('readonly attribute',)) ! vim.current.window.cursor = (1, 1):(, error('cursor position outside buffer',)) vim.current.window.cursor = True:(, TypeError('argument must be 2-item sequence, not bool',)) vim.current.window.height = "abc":(, TypeError('an integer is required',)) vim.current.window.width = "abc":(, TypeError('an integer is required',)) *** *** 1046,1054 vim.current.buffer.append(["\na", "bc"])
Patch 7.3.10
Patch 7.3.1081 Problem:Compiler warnings on 64-bit Windows. Solution: Change variable types. (Mike Williams) Files: src/if_py_both.h, src/regexp_nfa.c *** ../vim-7.3.1080/src/if_py_both.h2013-05-30 22:06:28.0 +0200 --- src/if_py_both.h2013-05-31 20:39:37.0 +0200 *** *** 1100,1106 long_uht_used; hashtab_T *ht; hashitem_T*hi; ! int todo; } dictiterinfo_T; static PyObject * --- 1100,1106 long_uht_used; hashtab_T *ht; hashitem_T*hi; ! long_utodo; } dictiterinfo_T; static PyObject * *** ../vim-7.3.1080/src/regexp_nfa.c2013-05-30 22:43:57.0 +0200 --- src/regexp_nfa.c2013-05-31 20:45:03.0 +0200 *** *** 283,289 static int realloc_post_list() { ! int nstate_max = post_end - post_start; int new_max = nstate_max + 1000; int *new_start; int *old_start; --- 283,289 static int realloc_post_list() { ! int nstate_max = (int)(post_end - post_start); int new_max = nstate_max + 1000; int *new_start; int *old_start; *** ../vim-7.3.1080/src/version.c 2013-05-31 19:01:13.0 +0200 --- src/version.c 2013-05-31 20:40:19.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1081, /**/ -- hundred-and-one symptoms of being an internet addict: 32. You don't know what sex three of your closest friends are, because they have neutral nicknames and you never bothered to ask. normal GA /// 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/groups/opt_out.
Re: pythonx patch - :pyx command
Marc Weber wrote: > There are two important problems with python support: > 1) you still have to use .viml in order to load python > 2) when using python its you having to remember which python to use despite > most codes may work with python and python3 interpreter. > Using the same (only one) interpreter is very important, because > many vims will only support one, and loading both is slower > > So this patch > - introduces the the option loadpyplugins, which is disabled by default > like loadplugins it tells vim to load plugin/*.py files > - Special commands like "# requires python 2.x" can be used to force Vim using > pyfile or py3file. If such a comment is missing the pythonx python version > setting > is used to decide upon which interpreter to use. Obviously this setting > should be set early in your .vimrc and not be touched again > Likewise there are :pyxfile :pydo :pythonx :pyx pyxeval() to run python code > depending on 'pythonx' setting. > - adds some of the commands to python.vim syntax file I think it's a good idea to help people write portable Python plugins. We want to avoid that every plugin has to be written twice. Not everything is compatible between Python 2 and 3 though. Is there a way to do: if python3: do-it-this-way else: do-it-that-way Then :pyx would really work. Is that possible without getting errors for some code that works only in one versin? In the patch the docs have the section "Python 3" twice. The default for 'pythonx' should be zero when build with both Python 2 and 3. Then the first Python command sets it. Should be called 'pythonversion' actually. -- hundred-and-one symptoms of being an internet addict: 30. Even though you died last week, you've managed to retain OPS on your favorite IRC channel. /// 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/groups/opt_out.
Re: {func} of sort()
ZyX wrote: > пятница, 31 мая 2013 г., 17:14:17 UTC+4 пользователь mattn написал: > > Hi all. > > > > filter() or map() is given {string} expression to compare the items. But > > sort() is given function name or funcref for that. > > I hope to give expression to {func}. > > > > I guess this is useful to call sort(). > > > > :echo sort([{"foo":3},{"foo":2},{"foo":4}], "v:lhs.foo - v:rhs.foo") > > [{'foo': 2}, {'foo': 3}, {'foo': 4}] > > > > Below is a patch. Please check and include. > > This patch still allow to give string for function name. > > > > https://gist.github.com/mattn/5684747 > > > > Thanks. > > - Yasuhiro Matsumoto > > I would prefer a patch for adding support for funcrefs in map/filter instead. > > And it is also bad idea to only overload strings: if you need > expressions here use special value (like "expr") in place of {dict}, > add second optional argument or whatever, but **do not silently allow > invalid function names taking them as expression**. There already is a > lot of places where vim shows strange behavior with otherwise invalid > input, don't add yet another one. Using strings here was just a quick way of making it work. What we would really need is some kind of lambda function. So the argument would be one of three types: expression - mainly for backwards compatibility, but also allows building the functionality from pieces. function name or reference - for bigger functions lamba function - for small functions That could be used in several places. Implementing a lambda function is not trivial though. -- Due knot trussed yore spell chequer two fined awl miss steaks. /// 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/groups/opt_out.
Re: Patch 7.3.1080
I wrote: > Patch 7.3.1080 > Problem:Test 86 fails. > Solution: Comment out the parts that don't work. Make it pass on 32 bit > systems. > Files:src/testdir/test86.in, src/testdir/test86.ok Note that this solves it by commenting out a function that apparently fails. I hope you can figure out why it fails, so we can re-enable the tests. At least we have the Python tests working again, so I dare to include a few more changes from the todo list. -- Give a man a computer program and you give him a headache, but teach him to program computers and you give him the power to create headaches for others for the rest of his life... R. B. Forest /// 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/groups/opt_out.
Re: New TOhtml
Ben Fritz wrote: > Since today is the last day for new features, here's the new TOhtml to > include. > > The main new feature is adding IDs to every line so you can add #L123 > to the end of the URL to jump to a specific line, like on Github, or > also #123 with javascript enabled. See the updated help file for > details. > > The bugfix for diffing unnamed buffers, plus a couple others, is also > included. > > I unfortunately did not get in two features I wanted to, because I've > been too busy at work this month: > > 1. ToCss command and support for drop-in replacement stylesheets from > other colorschemes > 2. The ability to specify mode like ":TOhtml cterm" in the GUI to > generate cterm colors > > I'll try to get those in during the months after the 7.4 Vim release. Thanks for the update, I'll include it. Let's indeed try not to make any big changes before the release. Only bug fixes! -- Q. What happens to programmers when they die? A: MS-Windows programmers are reinstalled. C++ programmers become undefined, anyone who refers to them will die as well. Java programmers reincarnate after being garbage collected. /// 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/groups/opt_out.
Patch 7.3.1082
=i+1', '))']) :call add(tl, [2, '.*John\&.*Bob', 'here is John, and here is B']) :call add(tl, [2, '.*John\&.*Bob', 'John is Bobs friend', 'John is Bob']) :call add(tl, [2, '\v(test1)@=.*yep', 'this is a test1, yep it is', 'test1, yep', 'test1']) *** ../vim-7.3.1081/src/testdir/test64.ok 2013-05-30 22:43:57.0 +0200 --- src/testdir/test64.ok 2013-05-31 21:16:29.0 +0200 *** *** 669,674 --- 669,677 OK 0 - \(John.*\)\@=.*Bob OK 1 - \(John.*\)\@=.*Bob OK 2 - \(John.*\)\@=.*Bob + OK 0 - \<\S\+\())\)\@= + OK 1 - \<\S\+\())\)\@= + OK 2 - \<\S\+\())\)\@= OK 0 - .*John\&.*Bob OK 1 - .*John\&.*Bob OK 2 - .*John\&.*Bob *** ../vim-7.3.1081/src/version.c 2013-05-31 20:49:27.0 +0200 --- src/version.c 2013-05-31 21:21:12.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1082, /**/ -- To define recursion, we must first define recursion. /// 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/groups/opt_out.
Patch 7.3.1083
Patch 7.3.1083 Problem:New regexp engine: Does not support \%^ and \%$. Solution: Support matching start and end of file. Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok *** ../vim-7.3.1082/src/regexp_nfa.c2013-05-31 21:45:05.0 +0200 --- src/regexp_nfa.c2013-05-31 21:55:35.0 +0200 *** *** 865,878 * pattern -- regardless of whether or not it makes sense. */ case '^': EMIT(NFA_BOF); - /* TODO: Not yet supported */ - return FAIL; break; case '$': EMIT(NFA_EOF); - /* TODO: Not yet supported */ - return FAIL; break; case '#': --- 865,874 *** *** 1780,1785 --- 1776,1783 case NFA_BOL: STRCPY(code, "NFA_BOL "); break; case NFA_EOW: STRCPY(code, "NFA_EOW "); break; case NFA_BOW: STRCPY(code, "NFA_BOW "); break; + case NFA_EOF: STRCPY(code, "NFA_EOF "); break; + case NFA_BOF: STRCPY(code, "NFA_BOF "); break; case NFA_STAR: STRCPY(code, "NFA_STAR "); break; case NFA_PLUS: STRCPY(code, "NFA_PLUS "); break; case NFA_NOT: STRCPY(code, "NFA_NOT "); break; *** *** 3705,3710 --- 3703,3719 break; } + case NFA_BOF: + if (reglnum == 0 && reginput == regline + && (!REG_MULTI || reg_firstlnum == 1)) + addstate_here(thislist, t->state->out, &t->sub, &listidx); + break; + + case NFA_EOF: + if (reglnum == reg_maxline && curc == NUL) + addstate_here(thislist, t->state->out, &t->sub, &listidx); + break; + #ifdef FEAT_MBYTE case NFA_COMPOSING: { *** ../vim-7.3.1082/src/testdir/test64.in 2013-05-31 21:45:05.0 +0200 --- src/testdir/test64.in 2013-05-31 22:10:12.0 +0200 *** *** 267,272 --- 267,281 :call add(tl, [2, '\_f', " \na ", "\n"]) :call add(tl, [2, '\_f\+', " \na ", "\na"]) :" + :"""" Test start/end of line, start/end of file + :call add(tl, [2, '^a.', "a_\nb ", "a_"]) + :call add(tl, [2, '^a.', "b a \na_"]) + :call add(tl, [2, '.a$', " a\n "]) + :call add(tl, [2, '.a$', " a b\n_a", "_a"]) + :call add(tl, [2, '\%^a.', "a a\na", "a "]) + :call add(tl, [2, '\%^a', " a \na "]) + :call add(tl, [2, '.a\%$', " a\n "]) + :call add(tl, [2, '.a\%$', " a\n_a", "_a"]) :" :"""" Test recognition of some character classes :call add(tl, [2, '[0-9]', '8', '8']) *** *** 466,471 --- 475,489 :call Postest() :put :" + :" start and end of buffer + /\%^ + yeGo p:" + 50%/\%^.. + yeGo pA END :" + 50%/\%$ + "ayb20gg/..\%$ + "bybGo "apo "bp:" + :" :/\%#=1^Results/,$wq! test.out ENDTEST *** ../vim-7.3.1082/src/testdir/test64.ok 2013-05-31 21:45:05.0 +0200 --- src/testdir/test64.ok 2013-05-31 22:10:47.0 +0200 *** *** 585,590 --- 585,614 OK 0 - \_f\+ OK 1 - \_f\+ OK 2 - \_f\+ + OK 0 - ^a. + OK 1 - ^a. + OK 2 - ^a. + OK 0 - ^a. + OK 1 - ^a. + OK 2 - ^a. + OK 0 - .a$ + OK 1 - .a$ + OK 2 - .a$ + OK 0 - .a$ + OK 1 - .a$ + OK 2 - .a$ + OK 0 - \%^a. + OK 1 - \%^a. + OK 2 - \%^a. + OK 0 - \%^a + OK 1 - \%^a + OK 2 - \%^a + OK 0 - .a\%$ + OK 1 - .a\%$ + OK 2 - .a\%$ + OK 0 - .a\%$ + OK 1 - .a\%$ + OK 2 - .a\%$ OK 0 - [0-9] OK 1 - [0-9] OK 2 - [0-9] *** *** 818,820 --- 842,848 ab!babababababfoo ba!ab##abab?bafoo **!*_ + Test + Test END + EN + E *** ../vim-7.3.1082/src/version.c 2013-05-31 21:45:05.0 +0200 --- src/version.c 2013-05-31 21:57:03.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1083, /**/ -- Have you heard about the new Beowulf cluster? It's so fast, it executes an infinite loop in 6 seconds. /// 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/groups/opt_out.
Patch 7.3.1084
e.start, NULL); - if (s == NULL) - goto theend; - patch(e.out, s); - PUSH(frag(e.start, list1(&s->out1))); - break; - case NFA_SKIP_CHAR: /* Symbol of 0-length, Used in a repetition * with max/min count of 0 */ --- 2339,2344 *** ../vim-7.3.1083/src/testdir/test64.in 2013-05-31 22:14:48.0 +0200 --- src/testdir/test64.in 2013-05-31 22:55:52.0 +0200 *** *** 182,188 :call add(tl, [2, 'a\{0,}', 'oij sdigfusnf', '']) :call add(tl, [2, 'a\{0,}', 'a aa', 'a']) :call add(tl, [2, 'a\{2,}', 'sdfiougjdsafg']) ! :call add(tl, [0, 'a\{2,}', 'asfoij ', 'a']) :call add(tl, [2, 'a\{,0}', 'oidfguih iuhi hiu ', '']) :call add(tl, [2, 'a\{,5}', 'abcd', 'a']) :call add(tl, [2, 'a\{,5}', 'aa', 'a']) --- 182,190 :call add(tl, [2, 'a\{0,}', 'oij sdigfusnf', '']) :call add(tl, [2, 'a\{0,}', 'a aa', 'a']) :call add(tl, [2, 'a\{2,}', 'sdfiougjdsafg']) ! :call add(tl, [2, 'a\{2,}', 'asfoij ', 'a']) ! :call add(tl, [2, 'a\{5,}', 'xxxxx ']) ! :call add(tl, [2, 'a\{5,}', 'xxaxxx ', 'a']) :call add(tl, [2, 'a\{,0}', 'oidfguih iuhi hiu ', '']) :call add(tl, [2, 'a\{,5}', 'abcd', 'a']) :call add(tl, [2, 'a\{,5}', 'aa', 'a']) *** *** 225,231 --- 227,235 :" :" Test greedy-ness and lazy-ness :call add(tl, [2, 'a\{-2,7}','a', 'aa']) + :call add(tl, [2, 'a\{-2,7}x','ax', 'aaax']) :call add(tl, [2, 'a\{2,7}','', 'aaa']) + :call add(tl, [2, 'a\{2,7}x','ax', 'aaax']) :call add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz']) :call add(tl, [2, '\vx(.*)yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz', 'ayxayzxayzxa','']) :call add(tl, [2, '\v(a{1,2}){-2,3}','aaa','','aa']) *** *** 366,372 :call add(tl, [2, '\_[^a]\+', "asfi\n9888", "sfi\n9888"]) :" :"""" Requiring lots of states. ! :call add(tl, [0, '[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}', " 12345678-1234-1234-1234-123456789012 ", "12345678-1234-1234-1234-123456789012", "1234-"]) :" :" :"""" Run the tests --- 370,376 :call add(tl, [2, '\_[^a]\+', "asfi\n9888", "sfi\n9888"]) :" :"""" Requiring lots of states. ! :call add(tl, [2, '[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}', " 12345678-1234-1234-1234-123456789012 ", "12345678-1234-1234-1234-123456789012", "1234-"]) :" :" :"""" Run the tests *** ../vim-7.3.1083/src/testdir/test64.ok 2013-05-31 22:14:48.0 +0200 --- src/testdir/test64.ok 2013-05-31 23:02:02.0 +0200 *** *** 389,394 --- 389,401 OK 2 - a\{2,} OK 0 - a\{2,} OK 1 - a\{2,} + OK 2 - a\{2,} + OK 0 - a\{5,} + OK 1 - a\{5,} + OK 2 - a\{5,} + OK 0 - a\{5,} + OK 1 - a\{5,} + OK 2 - a\{5,} OK 0 - a\{,0} OK 1 - a\{,0} OK 2 - a\{,0} *** *** 486,494 --- 493,507 OK 0 - a\{-2,7} OK 1 - a\{-2,7} OK 2 - a\{-2,7} + OK 0 - a\{-2,7}x + OK 1 - a\{-2,7}x + OK 2 - a\{-2,7}x OK 0 - a\{2,7} OK 1 - a\{2,7} OK 2 - a\{2,7} + OK 0 - a\{2,7}x + OK 1 - a\{2,7}x + OK 2 - a\{2,7}x OK 0 - \vx(.{-,8})yz(.*) OK 1 - \vx(.{-,8})yz(.*) OK 2 - \vx(.{-,8})yz(.*) *** *** 803,808 --- 816,822 OK 2 - \_[^a]\+ OK 0 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12} OK 1 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12} + OK 2 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12} 192.168.0.1 192.168.0.1 192.168.0.1 *** ../vim-7.3.1083/src/version.c 2013-05-31 22:14:48.0 +0200 --- src/version.c 2013-05-31 23:10:36.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1084, /**/ -- hundred-and-one symptoms of being an internet addict: 34. You laugh at people with a 10 Mbit connection. /// 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/groups/opt_out.
Patch 7.3.1085
te++; *** *** 2311,2316 --- 2319,2339 PUSH(frag(s, list1(&s->out1))); break; + case NFA_STAR_NONGREEDY: + /* Zero or more, prefer zero */ + if (nfa_calc_size == TRUE) + { + nstate++; + break; + } + e = POP(); + s = new_state(NFA_SPLIT, NULL, e.start); + if (s == NULL) + goto theend; + patch(e.out, s); + PUSH(frag(s, list1(&s->out))); + break; + case NFA_QUEST: /* one or zero atoms=> greedy match */ if (nfa_calc_size == TRUE) *** ../vim-7.3.1084/src/testdir/test64.in 2013-05-31 23:17:56.0 +0200 --- src/testdir/test64.in 2013-06-01 12:29:19.0 +0200 *** *** 23,30 :call add(tl, [2, 'ab', 'aab', 'ab']) :call add(tl, [2, 'b', 'abcdef', 'b']) :call add(tl, [2, 'bc*', 'abdef', 'b']) ! :call add(tl, [0, 'bc\{-}', 'abdef', 'b']) ! :call add(tl, [0, 'bc\{-}\(d\)', 'abdef', 'bd', 'd']) :call add(tl, [2, 'bc*', 'abbdef', 'b']) :call add(tl, [2, 'c*', 'ccc', 'ccc']) :call add(tl, [2, 'bc*', 'abdef', 'b']) --- 23,30 :call add(tl, [2, 'ab', 'aab', 'ab']) :call add(tl, [2, 'b', 'abcdef', 'b']) :call add(tl, [2, 'bc*', 'abdef', 'b']) ! :call add(tl, [2, 'bc\{-}', 'abdef', 'b']) ! :call add(tl, [2, 'bc\{-}\(d\)', 'abdef', 'bd', 'd']) :call add(tl, [2, 'bc*', 'abbdef', 'b']) :call add(tl, [2, 'c*', 'ccc', 'ccc']) :call add(tl, [2, 'bc*', 'abdef', 'b']) *** *** 201,216 :call add(tl, [2, 'a\{-0}', 'asoiuj', '']) :call add(tl, [2, 'a\{-2}', '', 'aa']) :call add(tl, [2, 'a\{-2}', 'abcdefghijklmnopqrestuvwxyz1234567890']) ! :call add(tl, [0, 'a\{-0,}', 'oij sdigfusnf', '']) ! :call add(tl, [0, 'a\{-0,}', 'a aa', '']) :call add(tl, [2, 'a\{-2,}', 'sdfiougjdsafg']) ! :call add(tl, [0, 'a\{-2,}', 'asfoij ', 'aa']) :call add(tl, [2, 'a\{-,0}', 'oidfguih iuhi hiu ', '']) :call add(tl, [2, 'a\{-,5}', 'abcd', '']) :call add(tl, [2, 'a\{-,5}', 'aa', '']) :" anti-greedy version of 'a*' ! :call add(tl, [0, 'a\{-}', 'bbbcddiuhfcd', '']) ! :call add(tl, [0, 'a\{-}', 'ioudfh coisf jda', '']) :" :" Test groups of characters and submatches :call add(tl, [2, '\(abc\)*', 'abcabcabc', 'abcabcabc', 'abc']) --- 201,216 :call add(tl, [2, 'a\{-0}', 'asoiuj', '']) :call add(tl, [2, 'a\{-2}', '', 'aa']) :call add(tl, [2, 'a\{-2}', 'abcdefghijklmnopqrestuvwxyz1234567890']) ! :call add(tl, [2, 'a\{-0,}', 'oij sdigfusnf', '']) ! :call add(tl, [2, 'a\{-0,}', 'a aa', '']) :call add(tl, [2, 'a\{-2,}', 'sdfiougjdsafg']) ! :call add(tl, [2, 'a\{-2,}', 'asfoij ', 'aa']) :call add(tl, [2, 'a\{-,0}', 'oidfguih iuhi hiu ', '']) :call add(tl, [2, 'a\{-,5}', 'abcd', '']) :call add(tl, [2, 'a\{-,5}', 'aa', '']) :" anti-greedy version of 'a*' ! :call add(tl, [2, 'a\{-}', 'bbbcddiuhfcd', '']) ! :call add(tl, [2, 'a\{-}', 'ioudfh coisf jda', '']) :" :" Test groups of characters and submatches :call add(tl, [2, '\(abc\)*', 'abcabcabc', 'abcabcabc', 'abc']) *** ../vim-7.3.1084/src/testdir/test64.ok 2013-05-31 23:17:56.0 +0200 --- src/testdir/test64.ok 2013-06-01 12:29:38.0 +0200 *** *** 10,17 --- 10,19 OK 2 - bc* OK 0 - bc\{-} OK 1 - bc\{-} + OK 2 - bc\{-} OK 0 - bc\{-}\(d\) OK 1 - bc\{-}\(d\) + OK 2 - bc\{-}\(d\) OK 0 - bc* OK 1 - bc* OK 2 - bc* *** *** 437,449 --- 439,454 OK 2 - a\{-2} OK 0 - a\{-0,} OK 1 - a\{-0,} + OK 2 - a\{-0,} OK 0 - a\{-0,} OK 1 - a\{-0,} + OK 2 - a\{-0,} OK 0 - a\{-2,} OK 1 - a\{-2,} OK 2 - a\{-2,} OK 0 - a\{-2,} OK 1 - a\{-2,} + OK 2 - a\{-2,} OK 0 - a\{-,0} OK 1 - a\{-,0} OK 2 - a\{-,0} *** *** 455,462 --- 460,469 OK 2 - a\{-,5} OK 0 - a\{-} OK 1 - a\{-} + OK 2 - a\{-} OK 0 - a\{-} OK 1 - a\{-} + OK 2 - a\{-} OK 0 - \(abc\)* OK 1 - \(abc\)* OK 2 - \(abc\)* *** ../vim-7.3.1084/src/version.c 2013-05-31 23:17:56.0 +0200 --- src/version.c 2013-06-01 12:39:01.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1085, /**/ -- hundred-and-one symptoms of being an internet addict: 35. Your husband tells you he's had the beard for 2 months. /// 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/groups/opt_out.
Re: [patch] fix spell checking problem with c.vim
Ken Takata wrote: > When I use #if 1 ... #endif in C, spell checking works incorrectly. > Here is an example: c-vim_before.png. > Spell checking is enabled inside #if 1, and disabled inside #if 0. > > Attached patch fixes this. (see c-vim_after.png) Thanks, I'll include it. -- He who laughs last, thinks slowest. /// 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/groups/opt_out.
Re: Patch 7.3.1083
Audrius Kažukauskas wrote: > 2013 m. gegužė 31 d., penktadienis 23:15:07 UTC+3, Bram Moolenaar rašė: > > Patch 7.3.1083 > > > > Problem:New regexp engine: Does not support \%^ and \%$. > > > > Solution: Support matching start and end of file. > > With this patch applied and using Python syntax script from > http://www.vim.org/scripts/script.php?script_idy0 I get this error when > opening any .py file: > > Error detected while processing /home/audrius/.vim/syntax/python.vim: > line 174: > E16: Invalid range > > With :set re=1 there's no error. I don't see an error when opening a Python file. So what is in that line of your python.vim? The URL you gave doesn't work. Must be this one: http://www.vim.org/scripts/script.php?script_id=790 The problem appears to be: [0-9A-Za-z-_.] That's indeed an invalid range. The old regexp engine somehow accepted it anyway. I suppose we need to make the new regexp engine do the same. Thanks for reporting the problem! -- hundred-and-one symptoms of being an internet addict: 38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail on the way back to bed. /// 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/groups/opt_out.
Patch 7.3.1086
Patch 7.3.1086 Problem:Old regexp engine accepts illegal range, new one doesn't. Solution: Also accept the illegal range with the new engine. Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok *** ../vim-7.3.1085/src/regexp_nfa.c2013-06-01 12:40:14.0 +0200 --- src/regexp_nfa.c2013-06-01 13:16:34.0 +0200 *** *** 1089,1096 * while loop. */ } } ! /* Try a range like 'a-x' or '\t-z' */ ! if (*regparse == '-') { emit_range = TRUE; startc = oldstartc; --- 1089,1097 * while loop. */ } } ! /* Try a range like 'a-x' or '\t-z'. Also allows '-' as a !* start character. */ ! if (*regparse == '-' && oldstartc != -1) { emit_range = TRUE; startc = oldstartc; *** *** 1140,1155 /* Normal printable char */ if (startc == -1) ! #ifdef FEAT_MBYTE ! startc = (*mb_ptr2char)(regparse); ! #else ! startc = *regparse; ! #endif /* Previous char was '-', so this char is end of range. */ if (emit_range) { ! endc = startc; startc = oldstartc; if (startc > endc) EMSG_RET_FAIL(_(e_invrange)); #ifdef FEAT_MBYTE --- 1141,1153 /* Normal printable char */ if (startc == -1) ! startc = PTR2CHAR(regparse); /* Previous char was '-', so this char is end of range. */ if (emit_range) { ! endc = startc; ! startc = oldstartc; if (startc > endc) EMSG_RET_FAIL(_(e_invrange)); #ifdef FEAT_MBYTE *** *** 1166,1172 TRY_NEG(); EMIT_GLUE(); } - emit_range = FALSE; } else #endif --- 1164,1169 *** *** 1190,1197 TRY_NEG(); EMIT_GLUE(); } - emit_range = FALSE; } } else { --- 1187,1195 TRY_NEG(); EMIT_GLUE(); } } + emit_range = FALSE; + startc = -1; } else { *** ../vim-7.3.1085/src/testdir/test64.in 2013-06-01 12:40:14.0 +0200 --- src/testdir/test64.in 2013-06-01 13:14:51.0 +0200 *** *** 270,275 --- 270,276 :call add(tl, [2, '\_[0-9]\+', "asfi\n9888u", "\n9888"]) :call add(tl, [2, '\_f', " \na ", "\n"]) :call add(tl, [2, '\_f\+', " \na ", "\na"]) + :call add(tl, [2, '[0-9A-Za-z-_.]\+', " @0_a.A-{ ", "0_a.A-"]) :" :"""" Test start/end of line, start/end of file :call add(tl, [2, '^a.', "a_\nb ", "a_"]) *** ../vim-7.3.1085/src/testdir/test64.ok 2013-06-01 12:40:14.0 +0200 --- src/testdir/test64.ok 2013-06-01 13:22:58.0 +0200 *** *** 605,610 --- 605,613 OK 0 - \_f\+ OK 1 - \_f\+ OK 2 - \_f\+ + OK 0 - [0-9A-Za-z-_.]\+ + OK 1 - [0-9A-Za-z-_.]\+ + OK 2 - [0-9A-Za-z-_.]\+ OK 0 - ^a. OK 1 - ^a. OK 2 - ^a. *** ../vim-7.3.1085/src/version.c 2013-06-01 12:40:14.0 +0200 --- src/version.c 2013-06-01 13:17:56.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1086, /**/ -- Micro$oft: where do you want to go today? Linux: where do you want to go tomorrow? FreeBSD: are you guys coming, or what? /// 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
Re: Typo in src/version.c
Marco Hinz wrote: > I just noticed a little glitch when I looked at :version > > --- a/src/version.c Thu May 30 22:44:02 2013 +0200 > +++ b/src/version.c Fri May 31 17:19:56 2013 +0200 > @@ -250,1 +250,1 @@ > - "+fork()", > + "+fork", > It was there intentionally. Does it cause a problem anywhere? -- The users that I support would double-click on a landmine to find out what happens. -- A system administrator /// 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/groups/opt_out.
Patch 7.3.1087
is */ ! regnpar = old_regnpar; old_post_pos = (int)(post_ptr - post_start); if (nfa_regatom() == FAIL) return FAIL; --- 1449,1462 /* Ignore previous call to nfa_regatom() */ post_ptr = post_start + my_post_start; ! /* Save parse state after the repeated atom and the \{} */ ! save_parse_state(&new_state); quest = (greedy == TRUE? NFA_QUEST : NFA_QUEST_NONGREEDY); for (i = 0; i < maxval; i++) { /* Goto beginning of the repeated atom */ ! restore_parse_state(&old_state); old_post_pos = (int)(post_ptr - post_start); if (nfa_regatom() == FAIL) return FAIL; *** *** 1486,1492 } /* Go to just after the repeated atom and the \{} */ ! regparse = new_regparse; curchr = -1; break; --- 1480,1486 } /* Go to just after the repeated atom and the \{} */ ! restore_parse_state(&new_state); curchr = -1; break; *** ../vim-7.3.1086/src/testdir/test64.in 2013-06-01 13:24:19.0 +0200 --- src/testdir/test64.in 2013-06-01 14:36:15.0 +0200 *** *** 188,193 --- 188,197 :call add(tl, [2, 'a\{,0}', 'oidfguih iuhi hiu ', '']) :call add(tl, [2, 'a\{,5}', 'abcd', 'a']) :call add(tl, [2, 'a\{,5}', 'aa', 'a']) + :" leading star as normal char when \{} follows + :call add(tl, [2, '^*\{4,}$', '***']) + :call add(tl, [2, '^*\{4,}$', '', '']) + :call add(tl, [2, '^*\{4,}$', '*', '*']) :" same thing as 'a*' :call add(tl, [2, 'a\{}', 'bbbcddiuhfcd', '']) :call add(tl, [2, 'a\{}', 'ioudfh coisf jda', '']) *** ../vim-7.3.1086/src/testdir/test64.ok 2013-06-01 13:24:19.0 +0200 --- src/testdir/test64.ok 2013-06-01 14:36:39.0 +0200 *** *** 407,412 --- 407,421 OK 0 - a\{,5} OK 1 - a\{,5} OK 2 - a\{,5} + OK 0 - ^*\{4,}$ + OK 1 - ^*\{4,}$ + OK 2 - ^*\{4,}$ + OK 0 - ^*\{4,}$ + OK 1 - ^*\{4,}$ + OK 2 - ^*\{4,}$ + OK 0 - ^*\{4,}$ + OK 1 - ^*\{4,}$ + OK 2 - ^*\{4,}$ OK 0 - a\{} OK 1 - a\{} OK 2 - a\{} *** ../vim-7.3.1086/src/version.c 2013-06-01 13:24:19.0 +0200 --- src/version.c 2013-06-01 14:37:37.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1087, /**/ -- Change is inevitable, except from a vending machine. /// 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/groups/opt_out.
Patch 7.3.1088
} ! if ((int)(reginput - regline) >= t->state->val) ! { ! reginput -= t->state->val; ! #ifdef FEAT_MBYTE ! if (has_mbyte) ! reginput -= mb_head_off(regline, reginput); ! #endif ! } ! else ! reginput = regline; ! } ! } /* Call nfa_regmatch() to check if the current concat matches * at this position. The concat ends with the node *** *** 3579,3585 * recursion. */ nfa_save_listids(start, listids); nfa_set_null_listids(start); ! result = nfa_regmatch(t->state->out, submatch, m); nfa_set_neg_listids(start); nfa_restore_listids(start, listids); --- 3694,3700 * recursion. */ nfa_save_listids(start, listids); nfa_set_null_listids(start); ! result = nfa_regmatch(t->state->out, submatch, m, endposp); nfa_set_neg_listids(start); nfa_restore_listids(start, listids); *** *** 4120,4130 * matters! * Do not add the start state in recursive calls of nfa_regmatch(), * because recursive calls should only start in the first position. * Also don't start a match past the first line. */ ! if (nfa_match == FALSE && start->c == NFA_MOPEN + 0 ! && reglnum == 0 && clen != 0 ! && (ireg_maxcol == 0 ! || (colnr_T)(reginput - regline) < ireg_maxcol)) { #ifdef ENABLE_LOG fprintf(log_fd, "(---) STARTSTATE\n"); --- 4235,4255 * matters! * Do not add the start state in recursive calls of nfa_regmatch(), * because recursive calls should only start in the first position. +* Unless "endp" is not NULL, then we match the end position. * Also don't start a match past the first line. */ ! if (nfa_match == FALSE ! && ((start->c == NFA_MOPEN + 0 ! && reglnum == 0 ! && clen != 0 ! && (ireg_maxcol == 0 ! || (colnr_T)(reginput - regline) < ireg_maxcol)) ! || (endp != NULL ! && (REG_MULTI ! ? (reglnum < endp->se_u.pos.lnum ! || (reglnum == endp->se_u.pos.lnum ! && (int)(reginput - regline) ! < endp->se_u.pos.col)) ! : reginput < endp->se_u.ptr { #ifdef ENABLE_LOG fprintf(log_fd, "(---) STARTSTATE\n"); *** *** 4148,4154 * finish. */ if (clen != 0) reginput += clen; ! else if (go_to_nextline) reg_nextline(); else break; --- 4273,4280 * finish. */ if (clen != 0) reginput += clen; ! else if (go_to_nextline || (endp != NULL && REG_MULTI ! && reglnum < endp->se_u.pos.lnum)) reg_nextline(); else break; *** *** 4225,4231 sub.in_use = 0; m.in_use = 0; ! if (nfa_regmatch(start, &sub, &m) == FALSE) return 0; cleanup_subexpr(); --- 4351,4357 sub.in_use = 0; m.in_use = 0; ! if (nfa_regmatch(start, &sub, &m, NULL) == FALSE) return 0; cleanup_subexpr(); *** ../vim-7.3.1087/src/testdir/test64.in 2013-06-01 14:42:51.0 +0200 --- src/testdir/test64.in 2013-06-01 18:45:09.0 +0200 *** *** 363,374 :call add(tl, [2, '\(a\)\(b\)\(c\)\(dd\)\(e\)\(f\)\(g\)\(h\)\(i\)\1\2\3\4\5\6\7\8\9', 'xabcddefghiabcddefghix', 'abcddefghiabcddefghi', 'a', 'b', 'c', 'dd', 'e', 'f', 'g', 'h', 'i']) :" :"""" Look-behind with limit ! :call add(tl, [0, '<\@<=span.', 'xxspanxxAc 7 ghi ! xxxstart3 -0- ffo bob --- 853,859 Ac 7 ghi ! xxstart3 -0- ffo bob *** ../vim-7.3.1087/src/version.c 2013-06-01 14:42:51.0 +0200 --- src/version.c 2013-06-01 18:37:11.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1088, /**/ -- Seen it all, done it all, can't remember most of it. /// 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/groups/opt_out.
Re: test86 and test87 fail on Windows
ZyX wrote: > # HG changeset patch > # User ZyX > # Date 1370101974 -14400 > # Branch python-extended-4 > # Node ID f37c4b0b09f688698e23d14c6f915968d0868523 > # Parent 0921ff181087b318c2322ab5af06758776a59bd1 > Fix platform-specific stuff in tests Thanks for the quick response! -- You have the right to remain silent. Anything you say will be misquoted, then used against you. /// 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/groups/opt_out.
Patch 7.3.1089
Patch 7.3.1089 Problem:Tests 86 and 87 fail on MS-Windows. (Ken Takata) Solution: Fix platform-specific stuff. (ZyX) Files: src/testdir/test86.in, src/testdir/test86.ok, src/testdir/test87.in, src/testdir/test87.ok *** ../vim-7.3.1088/src/testdir/test86.in 2013-05-31 19:01:13.0 +0200 --- src/testdir/test86.in 2013-06-01 20:27:14.0 +0200 *** *** 435,440 --- 435,441 :py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options :py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options :py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options + :set path=.,..,, :let lst=[] :let lst+=[['paste', 1, 0, 1, 2, 1,1, 0 ]] :let lst+=[['previewheight', 5, 1, 6, 'a',0,1, 0 ]] *** *** 530,542 b[0:0]=['baz'] vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number) # Test assigning to name property old_name = cb.name cb.name = 'foo' ! cb.append(cb.name[-11:]) b.name = 'bar' ! cb.append(b.name[-11:]) cb.name = old_name ! cb.append(cb.name[-17:]) # Test CheckBuffer for _b in vim.buffers: if _b is not cb: --- 531,544 b[0:0]=['baz'] vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number) # Test assigning to name property + import os old_name = cb.name cb.name = 'foo' ! cb.append(cb.name[-11:].replace(os.path.sep, '/')) b.name = 'bar' ! cb.append(b.name[-11:].replace(os.path.sep, '/')) cb.name = old_name ! cb.append(cb.name[-17:].replace(os.path.sep, '/')) # Test CheckBuffer for _b in vim.buffers: if _b is not cb: *** ../vim-7.3.1088/src/testdir/test86.ok 2013-05-31 19:01:13.0 +0200 --- src/testdir/test86.ok 2013-06-01 20:27:14.0 +0200 *** *** 310,316 W: 1:0 2:1 3:0 4:1 B: 1:0 2:1 3:0 4:1 >>> path ! p/gopts1: '.,/usr/include,,' inv: 0! TypeError p/wopts1! KeyError inv: 0! KeyError --- 310,316 W: 1:0 2:1 3:0 4:1 B: 1:0 2:1 3:0 4:1 >>> path ! p/gopts1: '.,..,,' inv: 0! TypeError p/wopts1! KeyError inv: 0! KeyError *** ../vim-7.3.1088/src/testdir/test87.in 2013-05-31 18:46:06.0 +0200 --- src/testdir/test87.in 2013-06-01 20:27:14.0 +0200 *** *** 404,409 --- 404,410 :py3 bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options :py3 bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options :py3 bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options + :set path=.,..,, :let lst=[] :let lst+=[['paste', 1, 0, 1, 2, 1,1, 0 ]] :let lst+=[['previewheight', 5, 1, 6, 'a',0,1, 0 ]] *** *** 499,511 b[0:0]=['baz'] vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number) # Test assigning to name property old_name = cb.name cb.name = 'foo' ! cb.append(cb.name[-11:]) b.name = 'bar' ! cb.append(b.name[-11:]) cb.name = old_name ! cb.append(cb.name[-17:]) # Test CheckBuffer for _b in vim.buffers: if _b is not cb: --- 500,513 b[0:0]=['baz'] vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number) # Test assigning to name property + import os old_name = cb.name cb.name = 'foo' ! cb.append(cb.name[-11:].replace(os.path.sep, '/')) b.name = 'bar' ! cb.append(b.name[-11:].replace(os.path.sep, '/')) cb.name = old_name ! cb.append(cb.name[-17:].replace(os.path.sep, '/')) # Test CheckBuffer for _b in vim.buffers: if _b is not cb: *** ../vim-7.3.1088/src/testdir/test87.ok 2013-05-31 18:46:06.0 +0200 --- src/testdir/test87.ok 2013-06-01 20:27:14.0 +0200 *** *** 299,305 W: 1:0 2:1 3:0 4:1 B: 1:0 2:1 3:0 4:1 >>> path ! p/gopts1: b'.,/usr/include,,' inv: 0! TypeError p/wopts1! KeyError inv: 0! KeyError --- 299,305 W: 1:0 2:1 3:0 4:1 B: 1:0 2:1 3:0 4:1 >>> path ! p/gopts1: b'.,..,,' inv: 0! TypeError p/wopts1! KeyError inv: 0! KeyError *** ../vim-7.3.1088/src/version.c 2013-06-01 19:54:39.0 +0200 --- src/version.c 2013-06-01 20:28:22.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1089, /**/ -- I wonder how much deeper the ocean would be without sponges. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\
Patch 7.3.10
Patch 7.3.1090 Problem:New regexp engine does not support \z1 .. \z9 and \z(. Solution: Implement the syntax submatches. Files: src/regexp.h, src/regexp_nfa.c *** ../vim-7.3.1089/src/regexp.h2013-05-30 17:05:34.0 +0200 --- src/regexp.h2013-06-01 22:18:07.0 +0200 *** *** 55,61 --- 55,63 char_ureganch; char_u*regmust; int regmlen; + #ifdef FEAT_SYN_HL char_ureghasz; + #endif char_uprogram[1]; /* actually longer.. */ } bt_regprog_T; *** *** 88,93 --- 90,98 nfa_state_T *start; int has_zend; /* pattern contains \ze */ int has_backref;/* pattern contains \1 .. \9 */ + #ifdef FEAT_SYN_HL + int reghasz; + #endif int nsubexp;/* number of () */ int nstate; nfa_state_T state[0]; /* actually longer.. */ *** ../vim-7.3.1089/src/regexp_nfa.c2013-06-01 19:54:39.0 +0200 --- src/regexp_nfa.c2013-06-01 22:54:08.0 +0200 *** *** 78,90 NFA_BACKREF7, /* \7 */ NFA_BACKREF8, /* \8 */ NFA_BACKREF9, /* \9 */ NFA_SKIP, /* Skip characters */ NFA_MOPEN, ! NFA_MCLOSE = NFA_MOPEN + NSUBEXP, /* NFA_FIRST_NL */ ! NFA_ANY = NFA_MCLOSE + NSUBEXP, /*Match any one character. */ NFA_ANYOF,/* Match any character in this string. */ NFA_ANYBUT, /* Match any character not in this string. */ NFA_IDENT,/* Match identifier char */ --- 78,144 NFA_BACKREF7, /* \7 */ NFA_BACKREF8, /* \8 */ NFA_BACKREF9, /* \9 */ + #ifdef FEAT_SYN_HL + NFA_ZREF1,/* \z1 */ + NFA_ZREF2,/* \z2 */ + NFA_ZREF3,/* \z3 */ + NFA_ZREF4,/* \z4 */ + NFA_ZREF5,/* \z5 */ + NFA_ZREF6,/* \z6 */ + NFA_ZREF7,/* \z7 */ + NFA_ZREF8,/* \z8 */ + NFA_ZREF9,/* \z9 */ + #endif NFA_SKIP, /* Skip characters */ NFA_MOPEN, ! NFA_MOPEN1, ! NFA_MOPEN2, ! NFA_MOPEN3, ! NFA_MOPEN4, ! NFA_MOPEN5, ! NFA_MOPEN6, ! NFA_MOPEN7, ! NFA_MOPEN8, ! NFA_MOPEN9, ! ! NFA_MCLOSE, ! NFA_MCLOSE1, ! NFA_MCLOSE2, ! NFA_MCLOSE3, ! NFA_MCLOSE4, ! NFA_MCLOSE5, ! NFA_MCLOSE6, ! NFA_MCLOSE7, ! NFA_MCLOSE8, ! NFA_MCLOSE9, ! ! #ifdef FEAT_SYN_HL ! NFA_ZOPEN, ! NFA_ZOPEN1, ! NFA_ZOPEN2, ! NFA_ZOPEN3, ! NFA_ZOPEN4, ! NFA_ZOPEN5, ! NFA_ZOPEN6, ! NFA_ZOPEN7, ! NFA_ZOPEN8, ! NFA_ZOPEN9, ! ! NFA_ZCLOSE, ! NFA_ZCLOSE1, ! NFA_ZCLOSE2, ! NFA_ZCLOSE3, ! NFA_ZCLOSE4, ! NFA_ZCLOSE5, ! NFA_ZCLOSE6, ! NFA_ZCLOSE7, ! NFA_ZCLOSE8, ! NFA_ZCLOSE9, ! #endif /* NFA_FIRST_NL */ ! NFA_ANY, /* Match any one character. */ NFA_ANYOF,/* Match any character in this string. */ NFA_ANYBUT, /* Match any character not in this string. */ NFA_IDENT,/* Match identifier char */ *** *** 221,227 static void nfa_save_listids __ARGS((nfa_state_T *start, int *list)); static void nfa_restore_listids __ARGS((nfa_state_T *start, int *list)); static int nfa_re_num_cmp __ARGS((long_u val, int op, long_u pos)); ! static long nfa_regtry __ARGS((nfa_state_T *start, colnr_T col)); static long nfa_regexec_both __ARGS((char_u *line, colnr_T col)); static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags)); static int nfa_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col)); --- 275,281 static void nfa_save_listids __ARGS((nfa_state_T *start, int *list)); static void nfa_restore_listids __ARGS((nfa_state_T *start, int *list)); static int nfa_re_num_cmp __ARGS((long_u val, int op, long_u pos)); ! static long nfa_regtry __ARGS((nfa_regprog_T *prog, colnr_T col)); static long nfa_regexec_both __ARGS((char_u *line, colnr_T col)); static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags)); static int nfa_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col)); *** *** 267,272 --- 321,327 nfa_has_zend = FALSE; nfa_has_backref = FALSE; + /* shared with BT engine */ regcomp_start(expr, re_flags); return OK; *** *** 799,804 --- 854,860
Re: Patch 7.3.10
I wrote: > Patch 7.3.1090 > Problem:New regexp engine does not support \z1 .. \z9 and \z(. > Solution: Implement the syntax submatches. > Files:src/regexp.h, src/regexp_nfa.c Sorry for the unfinished subject... Syntax highlighting of XML with long lines is a lot faster now. -- Nothing is fool-proof to a sufficiently talented fool. /// 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/groups/opt_out.
Re: [patch] fixed typos in doc (runtime/doc/{pattern,if_pyth}.txt)
Dominique Pelle wrote: > Attached patch fixes a few typos in runtime/doc/{pattern,if_pyth}.txt. Thanks. -- Everybody lies, but it doesn't matter since nobody listens. -- Lieberman's Law /// 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/groups/opt_out.
Re: Patch 7.3.10
Dominique Pelle wrote: > Bram Moolenaar wrote: > > > Syntax highlighting of XML with long lines is a lot faster now. > > Hi > > I was hoping for faster xml syntax highlighting after reading > the above comment, but using :set regexpengine=1 (old engine) > is much faster than :set regexpengine=0 (automatic engine). > > Here is a comparison using vim-7.3.1090 (big) on Linux x86_64: > > 1/ download this xml file: > > $ wget > http://svn.code.sf.net/p/languagetool/code/trunk/languagetool/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml > > 2/ create a simple ~/.vimrc > > $ cat ~/.vimrc > set nocompatible > set regexpengine=1 > filetype on > filetype plugin on > syntax on > > 3/ measure (using old regexp engine): > > $ time vim -c ':norm G' -c ':redraw|q' grammar.xml > real0m3.511s > user0m3.444s > sys0m0.052s Did you do this with an older xml syntax file, or the one recently committed? > 4/ change "set regexpengine=1" into "set regexpengine=0" in ~/.vimrc > > 5/ measure the same command again (using new regexp engine): > > $ time vim -c ':norm G' -c ':redraw|q' grammar.xml > > real0m16.429s > user0m16.117s > sys0m0.256s > > So in this xml example, it's x4.7 slower with the new > regexp engine. Is this expected? > > The grammar.xml file contains a few long lines. Here is the > length of the 5 longest lines: > > $ perl -ne 'print length($_), "\n"' < grammar.xml | sort -n | tail -5 > 812 > 924 > 1217 > 1343 > 2312 I have an XML file where the old engine basically gets stuck and I have to press CTRL-C to get back control. With the new engine it now does show up. The new engine is slower on normal patterns. I first want to make the new engine work with all possible regexp features. Then I want to automatically fall back to the old engine for patterns where it should be faster. Also, we should start using the limit on the look-behind matching. The XML syntax contains items like this: [<]\@<=[^ /!?<>"']\+ Clearly the look-behind will only work when going back one or two characters, going back further won't work. But the engine doesn't know that, it goes back to the start of the previous line before it gives up. This is much faster: [<]\@2<=[^ /!?<>"']\+ Then the engine give up two bytes before where the match needs to end. Another difference between the old and the new engine is that the new engine first finds a match with the look-behind. The old engine first finds a match with what follows. I'm not sure what works best. There is still a lot of speed optimizing to do, but I first want to make it work and fix any bugs. It doesn't make sense to optimize something that doesn't work. -- The 50-50-90 rule: Anytime you have a 50-50 chance of getting something right, there's a 90% probability you'll get it wrong. /// 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/groups/opt_out.
Re: Coding style & Vim source code
Marc Weber wrote: > ZyX told me that I should try to write the way the source code looks. > > Now I find that files mix tab with spaces etc. > > The src/README.txt talks about many things, but not about how to > configure Vim to write Vim's .c code. > > Would you mind adding a section or a reference to a .vim file describing > how to format Vim's C code properly? > > Eg os_unix.c contains a line 1439 like this: >return TRUE; /* exit! */ > 4 tabs, one space, then "return TRUE" > > If you want contributors to do the right thing document it briefly. Well, you already understand the essential: Use tabs as much as possible, use spaces to put it in the right place. The default options for 'cindent' and the modeline in the file are obviously the way to go. There are plenty of examples, most people pick it up easily. -- Latest survey shows that 3 out of 4 people make up 75% of the world's population. /// 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/groups/opt_out.
Re: Managing patches - proposal
Marc Weber wrote: [...] > If there is no alternative, would other people join and help maintaining > a git based mirror? Bram, would you even eventually consider looking > there for most up to date patches? We could still announce them on the > mailinglist. I have two important reasons to want patches to be emailed to me as a diff: 1. It shows explicit intent to have the patches included with Vim. When I download something from the internet I have no idea about copyright or even who wrote it. It would require going the way of having the author or authors sign a form (on paper, email won't do!). That gets messy. 2. With an emailed diff we both know (the sender and I) what I'm including exactly. When pulling from some repository I never know what state the change is in. I sometimes get an email with "try now", but it's not clear what "now" is. The current method worked very well for me, I don't see a reason to change. Note that if people want to distribute (experimental) patches to share with other users, then using something like github works very well. -- Never overestimate a man's ability to underestimate a woman. /// 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/groups/opt_out.
Patch 7.3.1091
Patch 7.3.1091 Problem:New regexp engine: no error when using \z1 or \z( where it does not work. Solution: Give an error message. Files: src/regexp.c, src/regexp_nfa.c *** ../vim-7.3.1090/src/regexp.c2013-06-01 19:54:39.0 +0200 --- src/regexp.c2013-06-02 14:56:07.0 +0200 *** *** 361,366 --- 361,368 static char_u e_unmatchedpp[] = N_("E53: Unmatched %s%%("); static char_u e_unmatchedp[] = N_("E54: Unmatched %s("); static char_u e_unmatchedpar[] = N_("E55: Unmatched %s)"); + static char_u e_z_not_allowed[] = N_("E66: \\z( not allowed here"); + static char_u e_z1_not_allowed[] = N_("E67: \\z1 et al. not allowed here"); #define NOT_MULTI 0 #define MULTI_ONE 1 *** *** 2120,2126 { #ifdef FEAT_SYN_HL case '(': if (reg_do_extmatch != REX_SET) ! EMSG_RET_NULL(_("E66: \\z( not allowed here")); if (one_exactly) EMSG_ONE_RET_NULL; ret = reg(REG_ZPAREN, &flags); --- 2122,2128 { #ifdef FEAT_SYN_HL case '(': if (reg_do_extmatch != REX_SET) ! EMSG_RET_NULL(_(e_z_not_allowed)); if (one_exactly) EMSG_ONE_RET_NULL; ret = reg(REG_ZPAREN, &flags); *** *** 2139,2145 case '7': case '8': case '9': if (reg_do_extmatch != REX_USE) ! EMSG_RET_NULL(_("E67: \\z1 et al. not allowed here")); ret = regnode(ZREF + c - '0'); re_has_z = REX_USE; break; --- 2141,2147 case '7': case '8': case '9': if (reg_do_extmatch != REX_USE) ! EMSG_RET_NULL(_(e_z1_not_allowed)); ret = regnode(ZREF + c - '0'); re_has_z = REX_USE; break; *** ../vim-7.3.1090/src/regexp_nfa.c2013-06-01 23:02:48.0 +0200 --- src/regexp_nfa.c2013-06-02 14:56:53.0 +0200 *** *** 865,870 --- 865,872 case '8': case '9': /* \z1...\z9 */ + if (reg_do_extmatch != REX_USE) + EMSG_RET_FAIL(_(e_z1_not_allowed)); EMIT(NFA_ZREF1 + (no_Magic(c) - '1')); /* No need to set nfa_has_backref, the sub-matches don't * change when \z1 .. \z9 maches or not. */ *** *** 872,877 --- 874,881 break; case '(': /* \z( */ + if (reg_do_extmatch != REX_SET) + EMSG_RET_FAIL(_(e_z_not_allowed)); if (nfa_reg(REG_ZPAREN) == FAIL) return FAIL;/* cascaded error */ re_has_z = REX_SET; *** ../vim-7.3.1090/src/version.c 2013-06-01 23:02:48.0 +0200 --- src/version.c 2013-06-02 14:58:17.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1091, /**/ -- Don't believe everything you hear or anything you say. /// 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/groups/opt_out.
Patch 7.3.1092
ifdef FEAT_SYN_HL int reghasz; #endif int nsubexp;/* number of () */ int nstate; nfa_state_T state[0]; /* actually longer.. */ --- 86,100 regengine_T *engine; unsigned regflags; ! nfa_state_T *start; /* points into state[] */ int has_zend; /* pattern contains \ze */ int has_backref;/* pattern contains \1 .. \9 */ #ifdef FEAT_SYN_HL int reghasz; #endif + #ifdef DEBUG + char_u*pattern; + #endif int nsubexp;/* number of () */ int nstate; nfa_state_T state[0]; /* actually longer.. */ *** ../vim-7.3.1091/src/version.c 2013-06-02 15:01:51.0 +0200 --- src/version.c 2013-06-02 15:53:16.0 +0200 ******* *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1092, /**/ -- I started out with nothing, and I still have most of it. -- Michael Davis -- "Tonight Show" /// 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/groups/opt_out.
Patch 7.3.1093
Patch 7.3.1093 Problem:New regexp engine: When a sub expression is empty \1 skips a character. Solution: Make \1 try the current position when the match is emtpy. Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok *** ../vim-7.3.1092/src/regexp_nfa.c2013-06-02 15:55:52.0 +0200 --- src/regexp_nfa.c2013-06-02 16:03:28.0 +0200 *** *** 4435,4445 { if (bytelen == 0) { ! /* empty match always works, add NFA_SKIP with zero to !* be used next */ ! addstate_here(thislist, t->state->out, &t->subs, &listidx); - thislist->t[listidx + 1].count = 0; } else if (bytelen <= clen) { --- 4435, { if (bytelen == 0) { ! /* empty match always works, output of NFA_SKIP to be !* used next */ ! addstate_here(thislist, t->state->out->out, &t->subs, &listidx); } else if (bytelen <= clen) { *** ../vim-7.3.1092/src/testdir/test64.in 2013-06-01 19:54:39.0 +0200 --- src/testdir/test64.in 2013-06-02 16:02:56.0 +0200 *** *** 361,366 --- 361,367 :call add(tl, [2, '\(\i\+\) \1', ' abc abc', 'abc abc', 'abc']) :call add(tl, [2, '\(\i\+\) \1', 'xgoo goox', 'goo goo', 'goo']) :call add(tl, [2, '\(a\)\(b\)\(c\)\(dd\)\(e\)\(f\)\(g\)\(h\)\(i\)\1\2\3\4\5\6\7\8\9', 'xabcddefghiabcddefghix', 'abcddefghiabcddefghi', 'a', 'b', 'c', 'dd', 'e', 'f', 'g', 'h', 'i']) + :call add(tl, [2, '\(\d*\)a \1b', ' a b ', 'a b', '']) :" : Look-behind with limit :call add(tl, [2, '<\@<=span.', 'xxspanxxhttp://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/groups/opt_out.
Patch 7.3.1094
nfa_regmatch(start, &subs, &m, NULL) == FALSE) return 0; cleanup_subexpr(); --- 4694,4700 clear_sub(&m.synt); #endif ! if (nfa_regmatch(start, &subs, &m) == FALSE) return 0; cleanup_subexpr(); *** ../vim-7.3.1093/src/version.c 2013-06-02 16:07:05.0 +0200 --- src/version.c 2013-06-02 16:25:02.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1094, /**/ -- The future isn't what it used to be. /// 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/groups/opt_out.
Patch 7.3.1095
03,2509 nstate++; break; } ! s = alloc_state(NFA_SKIP_CHAR, NULL, NULL); if (s == NULL) goto theend; PUSH(frag(s, list1(&s->out))); *** *** 2526,2537 break; } e = POP(); ! s1 = new_state(NFA_END_INVISIBLE, NULL, NULL); if (s1 == NULL) goto theend; patch(e.out, s1); ! s = new_state(NFA_START_INVISIBLE, e.start, s1); if (s == NULL) goto theend; if (*p == NFA_PREV_ATOM_NO_WIDTH_NEG --- 2526,2537 break; } e = POP(); ! s1 = alloc_state(NFA_END_INVISIBLE, NULL, NULL); if (s1 == NULL) goto theend; patch(e.out, s1); ! s = alloc_state(NFA_START_INVISIBLE, e.start, s1); if (s == NULL) goto theend; if (*p == NFA_PREV_ATOM_NO_WIDTH_NEG *** *** 2622,2631 * empty groups of parenthesis, and empty mbyte chars */ if (stackp == stack) { ! s = new_state(mopen, NULL, NULL); if (s == NULL) goto theend; ! s1 = new_state(mclose, NULL, NULL); if (s1 == NULL) goto theend; patch(list1(&s->out), s1); --- 2622,2631 * empty groups of parenthesis, and empty mbyte chars */ if (stackp == stack) { ! s = alloc_state(mopen, NULL, NULL); if (s == NULL) goto theend; ! s1 = alloc_state(mclose, NULL, NULL); if (s1 == NULL) goto theend; patch(list1(&s->out), s1); *** *** 2636,2646 /* At least one node was emitted before NFA_MOPEN, so * at least one node will be between NFA_MOPEN and NFA_MCLOSE */ e = POP(); ! s = new_state(mopen, e.start, NULL); /* `(' */ if (s == NULL) goto theend; ! s1 = new_state(mclose, NULL, NULL); /* `)' */ if (s1 == NULL) goto theend; patch(e.out, s1); --- 2636,2646 /* At least one node was emitted before NFA_MOPEN, so * at least one node will be between NFA_MOPEN and NFA_MCLOSE */ e = POP(); ! s = alloc_state(mopen, e.start, NULL); /* `(' */ if (s == NULL) goto theend; ! s1 = alloc_state(mclose, NULL, NULL); /* `)' */ if (s1 == NULL) goto theend; patch(e.out, s1); *** *** 2679,2688 nstate += 2; break; } ! s = new_state(*p, NULL, NULL); if (s == NULL) goto theend; ! s1 = new_state(NFA_SKIP, NULL, NULL); if (s1 == NULL) goto theend; patch(list1(&s->out), s1); --- 2679,2688 nstate += 2; break; } ! s = alloc_state(*p, NULL, NULL); if (s == NULL) goto theend; ! s1 = alloc_state(NFA_SKIP, NULL, NULL); if (s1 == NULL) goto theend; patch(list1(&s->out), s1); *** *** 2704,2710 break; } e1 = POP(); ! s = new_state(*p, NULL, NULL); if (s == NULL) goto theend; s->val = e1.start->c; --- 2704,2710 break; } e1 = POP(); ! s = alloc_state(*p, NULL, NULL); if (s == NULL) goto theend; s->val = e1.start->c; *** *** 2720,2726 nstate++; break; } ! s = new_state(*p, NULL, NULL); if (s == NULL) goto theend; PUSH(frag(s, list1(&s->out))); --- 2720,2726 nstate++; break; } ! s = alloc_state(*p, NULL, NULL); if (s == NULL) goto theend; PUSH(frag(s, list1(&s->out))); *** *** 4742,4749 if (prog->reghasz == REX_SET) { - int i; - cleanup_zsubexpr(); re_extmatch_out = make_extmatch(); for (i = 0; i < subs.synt.in_use; i++) --- 4742,4747 *** ../vim-7.3.1094/src/version.c 2013-06-02 16:34:14.0 +0200 --- src/version.c 2013-06-02 16:39:59.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1095, /**/ -- Microsoft
Re: fix warning with Vim 7.3.1090
Christian Brabandt wrote: > Bram, > gcc complains when compiling latest Vim version (7.3.1090) with > In file included from regexp.c:7864:0: > regexp_nfa.c: In function 'nfa_regpiece': > regexp_nfa.c:1390:19: warning: declaration of 'new_state' shadows a global > declaration [-Wshadow] > regexp_nfa.c:270:21: warning: shadowed declaration is here [-Wshadow] > regexp_nfa.c: In function 'nfa_regtry': > regexp_nfa.c:4727:7: warning: declaration of 'i' shadows a previous local > [-Wshadow] > regexp_nfa.c:4638:10: warning: shadowed declaration is here [-Wshadow] > > > Attached patch fixes it. Thanks. I think I slightly prefer renaming new_state() to alloc_state(). And remove the extra declaration. -- "Oh, no! NOT the Spanish Inquisition!" "NOBODY expects the Spanish Inquisition!!!" -- Monty Python sketch -- "Oh, no! NOT another option!" "EVERYBODY expects another option!!!" -- Discussion in vim-dev mailing list -- /// 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/groups/opt_out.
Re: FW: use of vim signs
Christian Brabandt wrote: > On Do, 30 Mai 2013, Christian Brabandt wrote: > > > Forwarding to vim-dev > > > > On Mi, 29 Mai 2013, Ben Fritz wrote: > > > > > I like the proposal by "glts" myself: > > > > > > > - ":set nonu nornu" means: I don't want any line numbers; > > > > - ":set nu nornu" means: I want to see only absolute numbers; > > > > - ":set nonu rnu" means: I want to see only relative numbers; > > > > - ":set nu rnu" means: I want to have the best of both worlds. > > > > > > Christian, what is the problem you have with this approach? > > > > I think, this is confusing. But as I said, I don't have a strong opinion > > on that, so here is a patch to try out: > > displaying the absolute line number instead of the zero for relative > line numbering seems to have caused many controversial opinions here and > at vim-use (but I have not seen it in the latest todo.txt file). > > Would you consider any of the patches that make this behaviour > customizable for the vim 7.4 release? There is too much discussion about this. I think the current behavior is OK and does not have enough disadvantage to justify adding yet another option. -- hundred-and-one symptoms of being an internet addict: 42. Your virtual girlfriend finds a new net sweetheart with a larger bandwidth. /// 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/groups/opt_out.
Re: Patch for variable tabstops
Christian Brabandt wrote: > Bram, > > will this patch at least end up in todo.txt? I thought it was there, but I can't find it. Where is the patch? Note that this patch has a very high chance of causing new bugs, thus a low chance of getting included soon. At least we need to fix the bugs for conceal mode first. -- hundred-and-one symptoms of being an internet addict: 43. You tell the kids they can't use the computer because "Daddy's got work to do" and you don't even have a job. /// 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/groups/opt_out.
Patch 7.3.1096
-- em('d[b"a\\0b"]=1') em('d.pop("abc")') ! em('d.popitem()') EOF :$put =messages :unlet messages *** ../vim-7.3.1095/src/testdir/test87.ok 2013-06-01 20:32:09.0 +0200 --- src/testdir/test87.ok 2013-06-02 17:39:35.0 +0200 *** *** 26,32 False [b'0'] {'0': -1} ! (b'', -1) None [] [0, 1, 2, 3] --- 26,32 False [b'0'] {'0': -1} ! (b'0', -1) None [] [0, 1, 2, 3] *** *** 663,669 d.update((("a", FailingMappingKey()),)):(, NotImplementedError()) <<< Finished >> DictionaryPopItem ! d.popitem(1, 2):(, TypeError('function takes exactly 1 argument (2 given)',)) >> DictionaryHasKey d.has_key():(, TypeError('function takes exactly 1 argument (0 given)',)) > List --- 663,669 d.update((("a", FailingMappingKey()),)):(, NotImplementedError()) <<< Finished >> DictionaryPopItem ! d.popitem(1, 2):(, TypeError('popitem() takes no arguments (2 given)',)) >> DictionaryHasKey d.has_key():(, TypeError('function takes exactly 1 argument (0 given)',)) > List *** ../vim-7.3.1095/src/version.c 2013-06-02 16:40:44.0 +0200 --- src/version.c 2013-06-02 17:40:20.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1096, /**/ -- hundred-and-one symptoms of being an internet addict: 44. Your friends no longer send you e-mail...they just log on to your IRC channel. /// 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/groups/opt_out.
Patch 7.3.1097
Patch 7.3.1097 Problem:Python: a few recently added items are not documented. Solution: Update the documentation. (ZyX) Files: runtime/doc/if_pyth.txt *** ../vim-7.3.1096/runtime/doc/if_pyth.txt 2013-06-02 17:41:50.0 +0200 --- runtime/doc/if_pyth.txt 2013-06-02 17:44:29.0 +0200 *** *** 176,181 --- 176,185 |python-bindeval-objects|. These python objects let you modify (|List| or |Dictionary|) or call (|Funcref|) vim objects. + vim.strwidth(str) *python-strwidth* + Like |strwidth()|: returns number of display cells str occupies, tab + is counted as one cell. + Error object of the "vim" module vim.error *python-error* *** *** 329,334 --- 333,340 |BufFilePost| autocommands are launched. b.numberBuffer number. Can be used as |python-buffers| key. Read-only. + b.valid True or False. Buffer object becames invalid when + corresponding buffer is wiped out. The buffer object methods are: b.append(str) Append a line to the buffer *** *** 433,438 --- 439,446 row, col (read-only)On-screen window position in display cells. First position is zero. tabpage (read-only) Window tab page. + valid (read-write) True or False. Window object becames invalid + when corresponding window is closed. The height attribute is writable only if the screen is split horizontally. The width attribute is writable only if the screen is split vertically. *** *** 456,461 --- 464,471 windows Like |python-windows|, but for current tab page. varsThe tab page |t:| variables. window Current tabpage window. + valid True or False. Tab page object becames invalid when + corresponding tab page is closed. TabPage object type is available using "TabPage" attribute of vim module. *** ../vim-7.3.1096/src/version.c 2013-06-02 17:41:50.0 +0200 --- src/version.c 2013-06-02 17:44:06.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1097, /**/ -- hundred-and-one symptoms of being an internet addict: 45. You buy a Captain Kirk chair with a built-in keyboard and mouse. /// 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/groups/opt_out.
Patch 7.3.1098
Patch 7.3.1098 Problem:Python: Possible memory leaks Solution: Add Py_XDECREF() calls. (ZyX) Files: src/if_py_both.h *** ../vim-7.3.1097/src/if_py_both.h2013-06-02 17:41:50.0 +0200 --- src/if_py_both.h2013-06-02 18:01:56.0 +0200 *** *** 1017,1022 --- 1017,1023 if (*key == NUL) { RAISE_NO_EMPTY_KEYS; + Py_XDECREF(todecref); return NULL; } *** *** 1160,1165 --- 1161,1167 if (!(key = StringToChars(keyObject, &todecref))) return -1; + if (*key == NUL) { RAISE_NO_EMPTY_KEYS; *** *** 2216,2224 --- 2218,2228 if (!(key = StringToChars(keyObject, &todecref))) return NULL; + if (*key == NUL) { RAISE_NO_EMPTY_KEYS; + Py_XDECREF(todecref); return NULL; } *** *** 2349,2357 --- 2353,2363 if (!(key = StringToChars(keyObject, &todecref))) return -1; + if (*key == NUL) { RAISE_NO_EMPTY_KEYS; + Py_XDECREF(todecref); return -1; } *** *** 4568,4573 --- 4574,4580 dict_unref(dict); return -1; } + if (*key == NUL) { dict_unref(dict); *** *** 4651,4656 --- 4658,4664 dict_unref(dict); return -1; } + if (*key == NUL) { Py_DECREF(keyObject); *** ../vim-7.3.1097/src/version.c 2013-06-02 17:46:37.0 +0200 --- src/version.c 2013-06-02 18:02:37.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1098, /**/ -- hundred-and-one symptoms of being an internet addict: 47. You are so familiar with the WWW that you find the search engines useless. /// 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/groups/opt_out.
Patch 7.3.1099
Patch 7.3.1099 Problem:Python: Changing directory with os.chdir() causes problems for Vim's notion of directories. Solution: Add vim.chdir() and vim.fchdir(). (ZyX) Files: runtime/doc/if_pyth.txt, src/ex_docmd.c, src/if_py_both.h, src/if_python3.c, src/if_python.c, src/proto/ex_docmd.pro, src/testdir/test86.in, src/testdir/test86.ok, src/testdir/test87.in, src/testdir/test87.ok *** ../vim-7.3.1098/runtime/doc/if_pyth.txt 2013-06-02 17:46:37.0 +0200 --- runtime/doc/if_pyth.txt 2013-06-02 18:11:13.0 +0200 *** *** 180,185 --- 180,192 Like |strwidth()|: returns number of display cells str occupies, tab is counted as one cell. + vim.chdir(*args, **kwargs)*python-chdir* + vim.fchdir(*args, **kwargs) *python-fchdir* + Run os.chdir or os.fchdir, then all appropriate vim stuff. + Note: you should not use these functions directly, use os.chdir and + os.fchdir instead. Behavior of vim.fchdir is undefined in case + os.fchdir does not exist. + Error object of the "vim" module vim.error *python-error* *** ../vim-7.3.1098/src/ex_docmd.c 2013-05-17 16:39:59.0 +0200 --- src/ex_docmd.c 2013-06-02 18:20:05.0 +0200 *** *** 8182,8187 --- 8182,8218 } #endif + /* + * Deal with the side effects of changing the current directory. + * When "local" is TRUE then this was after an ":lcd" command. + */ + void + post_chdir(local) + int local; + { + vim_free(curwin->w_localdir); + if (local) + { + /* If still in global directory, need to remember current +* directory as global directory. */ + if (globaldir == NULL && prev_dir != NULL) + globaldir = vim_strsave(prev_dir); + /* Remember this local directory for the window. */ + if (mch_dirname(NameBuff, MAXPATHL) == OK) + curwin->w_localdir = vim_strsave(NameBuff); + } + else + { + /* We are now in the global directory, no need to remember its +* name. */ + vim_free(globaldir); + globaldir = NULL; + curwin->w_localdir = NULL; + } + + shorten_fnames(TRUE); + } + /* * ":cd", ":lcd", ":chdir" and ":lchdir". *** *** 8253,8279 EMSG(_(e_failed)); else { ! vim_free(curwin->w_localdir); ! if (eap->cmdidx == CMD_lcd || eap->cmdidx == CMD_lchdir) ! { ! /* If still in global directory, need to remember current !* directory as global directory. */ ! if (globaldir == NULL && prev_dir != NULL) ! globaldir = vim_strsave(prev_dir); ! /* Remember this local directory for the window. */ ! if (mch_dirname(NameBuff, MAXPATHL) == OK) ! curwin->w_localdir = vim_strsave(NameBuff); ! } ! else ! { ! /* We are now in the global directory, no need to remember its !* name. */ ! vim_free(globaldir); ! globaldir = NULL; ! curwin->w_localdir = NULL; ! } ! ! shorten_fnames(TRUE); /* Echo the new current directory if the command was typed. */ if (KeyTyped || p_verbose >= 5) --- 8284,8290 EMSG(_(e_failed)); else { ! post_chdir(eap->cmdidx == CMD_lcd || eap->cmdidx == CMD_lchdir); /* Echo the new current directory if the command was typed. */ if (KeyTyped || p_verbose >= 5) *** ../vim-7.3.1098/src/if_py_both.h2013-06-02 18:07:33.0 +0200 --- src/if_py_both.h2013-06-02 18:11:13.0 +0200 *** *** 52,57 --- 52,61 static PyObject *globals; + static PyObject *py_chdir; + static PyObject *py_fchdir; + static PyObject *py_getcwd; + /* * obtain a lock on the Vim data structures */ *** *** 706,722 ); } /* * Vim module - Definitions */ static struct PyMethodDef VimMethods[] = { ! /* name, function, calling,documentation */ ! {"command",VimCommand,METH_VARARGS, "Execute a Vim ex-mode command" }, ! {"eval", VimEval, METH_VARARGS, "Evaluate an expression using Vim evaluator" }, ! {"bindeval", VimEvalPy, METH_VARARGS, "Like eval(), but returns objects attached to vim ones"}, ! {"strwidth", VimStrwidth, METH_VARARGS, "Screen string width, counts as having width 1"}, ! { NULL,NULL, 0, NULL } }; /* --- 710,793 ); } + static PyObject * + _VimChdir(PyObject *_chdir, PyObject *args, PyObj
Re: [PATCH] (5/?) Add vim.version and vim.version_info
ZyX wrote: > # HG changeset patch > # User ZyX > # Date 1370096560 -14400 > # Branch python-extended-4 > # Node ID f322321a58b1a500736527ea82627fd65b2954bb > # Parent 807b755f9898d68e4d93f18e7964783b207826b2 > Add vim.version and vim.version_info I am not including this patch, for these reasons: > +MSG_PUTS(_("\n" VIM_VERSION_PLATFORM)); This breaks translations. And string concatenation doesn't work with older compilers. Should at least be split up into: MSG_PUTS("\n"); MSG_PUTS(_(VIM_VERSION_PLATFORM)); All the messages in version.h need to have N_() around them so that they can be translated. You can't leave out the trailing "version", because after translation it may appear somewhere else in the text. -- The real trick is this: to keep the lines as short as possible and keep the size the same yet free from the need for hyphena- Dammit!! (Matthew Winn) /// 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/groups/opt_out.
Patch 7.3.1100
to convert to vim structure',)) + vim.List([Mapping({"abc" : {b"": 1}})]):(, ValueError('empty keys are not allowed',)) vim.List([Mapping({"abc" : {"": 1}})]):(, ValueError('empty keys are not allowed',)) vim.List([Mapping({"abc" : FailingMapping()})]):(, NotImplementedError()) vim.List([Mapping({"abc" : FailingMappingKey()})]):(, NotImplementedError()) *** *** 736,741 --- 747,753 <<< Finished >>> Testing ConvertFromPyObject using vim.List([%s]) vim.List([None]):(, TypeError('unable to convert to vim structure',)) + vim.List([{b"": 1}]):(, ValueError('empty keys are not allowed',)) vim.List([{"": 1}]):(, ValueError('empty keys are not allowed',)) vim.List([FailingMapping()]):(, NotImplementedError()) vim.List([FailingMappingKey()]):(, NotImplementedError()) *** *** 772,777 --- 784,790 <<< Finished >>> Testing ConvertFromPyObject using l[:] = [{"abc" : %s}] l[:] = [{"abc" : None}]:(, TypeError('unable to convert to vim structure',)) + l[:] = [{"abc" : {b"": 1}}]:(, ValueError('empty keys are not allowed',)) l[:] = [{"abc" : {"": 1}}]:(, ValueError('empty keys are not allowed',)) l[:] = [{"abc" : FailingMapping()}]:(, NotImplementedError()) l[:] = [{"abc" : FailingMappingKey()}]:(, NotImplementedError()) *** *** 797,802 --- 810,816 <<< Finished >>> Testing ConvertFromPyObject using l[:] = [Mapping({"abc" : %s})] l[:] = [Mapping({"abc" : None})]:(, TypeError('unable to convert to vim structure',)) + l[:] = [Mapping({"abc" : {b"": 1}})]:(, ValueError('empty keys are not allowed',)) l[:] = [Mapping({"abc" : {"": 1}})]:(, ValueError('empty keys are not allowed',)) l[:] = [Mapping({"abc" : FailingMapping()})]:(, NotImplementedError()) l[:] = [Mapping({"abc" : FailingMappingKey()})]:(, NotImplementedError()) *** *** 807,812 --- 821,827 <<< Finished >>> Testing ConvertFromPyObject using l[:] = [%s] l[:] = [None]:(, TypeError('unable to convert to vim structure',)) + l[:] = [{b"": 1}]:(, ValueError('empty keys are not allowed',)) l[:] = [{"": 1}]:(, ValueError('empty keys are not allowed',)) l[:] = [FailingMapping()]:(, NotImplementedError()) l[:] = [FailingMappingKey()]:(, NotImplementedError()) *** *** 837,842 --- 852,858 <<< Finished >>> Testing ConvertFromPyObject using l.extend([{"abc" : %s}]) l.extend([{"abc" : None}]):(, TypeError('unable to convert to vim structure',)) + l.extend([{"abc" : {b"": 1}}]):(, ValueError('empty keys are not allowed',)) l.extend([{"abc" : {"": 1}}]):(, ValueError('empty keys are not allowed',)) l.extend([{"abc" : FailingMapping()}]):(, NotImplementedError()) l.extend([{"abc" : FailingMappingKey()}]):(, NotImplementedError()) *** *** 862,867 --- 878,884 <<< Finished >>> Testing ConvertFromPyObject using l.extend([Mapping({"abc" : %s})]) l.extend([Mapping({"abc" : None})]):(, TypeError('unable to convert to vim structure',)) + l.extend([Mapping({"abc" : {b"": 1}})]):(, ValueError('empty keys are not allowed',)) l.extend([Mapping({"abc" : {"": 1}})]):(, ValueError('empty keys are not allowed',)) l.extend([Mapping({"abc" : FailingMapping()})]):(, NotImplementedError()) l.extend([Mapping({"abc" : FailingMappingKey()})]):(, NotImplementedError()) *** *** 872,877 --- 889,895 <<< Finished >>> Testing ConvertFromPyObject using l.extend([%s]) l.extend([None]):(, TypeError('unable to convert to vim structure',)) + l.extend([{b"": 1}]):(, ValueError('empty keys are not allowed',)) l.extend([{"": 1}]):(, ValueError('empty keys are not allowed',)) l.extend([FailingMapping()]):(, NotImplementedError()) l.extend([FailingMappingKey()]):(, NotImplementedError()) *** *** 907,912 --- 925,931 <<< Finished >>> Testing ConvertFromPyObject using f({"abc" : %s}) f({"abc" : None}):(, TypeError('unable to convert to vim structure',)) + f({"abc" : {b"": 1}}):(, ValueError('empty keys are not allowed',)) f({"abc" : {"": 1}}):(, ValueError('empty keys are not allowed',)) f({"abc" : FailingMapping()}):(, NotImplementedError()) f({"abc" : FailingMappingKey()}):(, NotImplementedError()) *** *** 932,937 --- 951,957 <<< Finished >>> Testing ConvertFromPyObject using f(Mapping({"abc" : %s})) f(Mapping({"abc" : None})):(, TypeError('unable to convert to vim structure',)) + f(Mapping({"abc" : {b"": 1}})):(, ValueError('empty keys are not allowed',)) f(Mapping({"abc" : {"": 1}})):(, ValueError('empty keys are not allowed',)) f(Mapping({"abc" : FailingMapping()})):(, NotImplementedError()) f(Mapping({"abc" : FailingMappingKey()})):(, NotImplementedError()) *** *** 942,947 --- 962,968 <<< Finished >>> Testing ConvertFromPyObject using f(%s) f(None):(, TypeError('unable to convert to vim structure',)) + f({b"": 1}):(, ValueError('empty keys are not allowed',)) f({"": 1}):(, ValueError('empty keys are not allowed',)) f(FailingMapping()):(, NotImplementedError()) f(FailingMappingKey()):(, NotImplementedError()) *** *** 967,972 --- 988,994 <<< Finished >>> Testing ConvertFromPyObject using fd(self={"abc" : %s}) fd(self={"abc" : None}):(, TypeError('unable to convert to vim structure',)) + fd(self={"abc" : {b"": 1}}):(, ValueError('empty keys are not allowed',)) fd(self={"abc" : {"": 1}}):(, ValueError('empty keys are not allowed',)) fd(self={"abc" : FailingMapping()}):(, NotImplementedError()) fd(self={"abc" : FailingMappingKey()}):(, NotImplementedError()) *** *** 992,997 --- 1014,1020 <<< Finished >>> Testing ConvertFromPyObject using fd(self=Mapping({"abc" : %s})) fd(self=Mapping({"abc" : None})):(, TypeError('unable to convert to vim structure',)) + fd(self=Mapping({"abc" : {b"": 1}})):(, ValueError('empty keys are not allowed',)) fd(self=Mapping({"abc" : {"": 1}})):(, ValueError('empty keys are not allowed',)) fd(self=Mapping({"abc" : FailingMapping()})):(, NotImplementedError()) fd(self=Mapping({"abc" : FailingMappingKey()})):(, NotImplementedError()) *** *** 1002,1007 --- 1025,1031 <<< Finished >>> Testing ConvertFromPyObject using fd(self=%s) fd(self=None):(, TypeError('unable to convert object to vim dictionary',)) + fd(self={b"": 1}):(, ValueError('empty keys are not allowed',)) fd(self={"": 1}):(, ValueError('empty keys are not allowed',)) fd(self=FailingMapping()):(, NotImplementedError()) fd(self=FailingMappingKey()):(, NotImplementedError()) *** ../vim-7.3.1099/src/version.c 2013-06-02 18:20:12.0 +0200 --- src/version.c 2013-06-02 18:53:59.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1100, /**/ -- hundred-and-one symptoms of being an internet addict: 48. You get a tatoo that says "This body best viewed with Netscape 3.1 or higher." /// 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/groups/opt_out.
Patch 7.3.1101
ig::CONFIG[['libdir']])"` if test -f "$rubylibdir/$librubya"; then librubyarg="$librubyarg" ! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" ! elif test "$librubyarg" = "libruby.a"; then ! dnl required on Mac OS 10.3 where libruby.a doesn't exist ! librubyarg="-lruby" ! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" fi if test "X$librubyarg" != "X"; then *** ../vim-7.3.1100/src/auto/configure 2013-05-15 14:51:31.0 +0200 --- src/auto/configure 2013-06-02 19:03:17.0 +0200 *** *** 5347,5360 else vi_cv_path_python_conf= ! for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do ! for subdir in lib64 lib share; do ! d="${path}/${subdir}/python${vi_cv_var_python_version}/config" ! if test -d "$d" && test -f "$d/config.c"; then ! vi_cv_path_python_conf="$d" ! fi done ! done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5 --- 5347,5365 else vi_cv_path_python_conf= ! d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"` ! if test -d "$d" && test -f "$d/config.c"; then ! vi_cv_path_python_conf="$d" ! else ! for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do ! for subdir in lib64 lib share; do ! d="${path}/${subdir}/python${vi_cv_var_python_version}/config" ! if test -d "$d" && test -f "$d/config.c"; then ! vi_cv_path_python_conf="$d" ! fi ! done done ! fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5 *** *** 5660,5673 if test "${vi_cv_var_python3_abiflags}" != ""; then config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" fi ! for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do !for subdir in lib64 lib share; do ! d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}" ! if test -d "$d" && test -f "$d/config.c"; then !vi_cv_path_python3_conf="$d" ! fi done ! done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5 --- 5665,5683 if test "${vi_cv_var_python3_abiflags}" != ""; then config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" fi ! d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"` ! if test -d "$d" && test -f "$d/config.c"; then !vi_cv_path_python3_conf="$d" ! else !for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do !for subdir in lib64 lib share; do ! d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}" ! if test -d "$d" && test -f "$d/config.c"; then !vi_cv_path_python3_conf="$d" ! fi !done done ! fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5 *** *** 6408,6420 fi librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"` librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"` ! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"` if test -f "$rubylibdir/$librubya"; then librubyarg="$librubyarg" ! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" ! elif test "$librubyarg" = "libruby.a"; then ! librubyarg="-lruby" ! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" fi if test "X$librubyarg" != "X"; then --- 6418,6430 fi librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"` librubya=`$vi_cv_path_ruby -r rbconfig -e "
Patch 7.3.1102
Patch 7.3.1102 Problem:Completion of ":py3do" and ":py3file" does not work after ":py3". Solution: Make completion work. (Taro Muraoka) Files: src/ex_docmd.c *** ../vim-7.3.1101/src/ex_docmd.c 2013-06-02 18:20:12.0 +0200 --- src/ex_docmd.c 2013-06-02 19:18:08.0 +0200 *** *** 3249,3254 --- 3249,3257 /* check for non-alpha command */ if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL) ++p; + /* for python 3.x: ":py3*" commands completion */ + if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3') + ++p; len = (int)(p - cmd); if (len == 0) *** ../vim-7.3.1101/src/version.c 2013-06-02 19:14:11.0 +0200 --- src/version.c 2013-06-02 19:16:56.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1102, /**/ -- CVS sux, men don't like commitment /// 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/groups/opt_out.
Python os.chdir() patch
I have included patch 7.3.1099, which handles os.chdir() and os.fchdir(). There was an earlier patch from Xavier de Gaye on May 17. Is there anything in that patch not covered by 7.3.1099? At least here was discussion about adding something to Python's path, so that "import something" would find something.py in a Vim runtime directory. I lost track of what the consensus was for that. I think it would be good if plugin writers using Python can simply import a Python module, without having to worry about where it is located exactly. This encourages sharing these modules between plugins. We could have a specific "python" and/or "python3" directory somewhere in the Vim runtime tree (also below ~/.vim). Or just use one of the existing directories, such as "autoload". -- hundred-and-one symptoms of being an internet addict: 50. The last girl you picked up was only a jpeg. /// 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/groups/opt_out.
Python screen access
Almost three years ago Mark Mahnic sent a patch to access the screen from inside Python. It was sent on 2010 July 19. These are the docs: 6. Screen object*python-screen* The screen object provides direct access to the Vim internal screen. The object has the following methods: puts(row, col, attr, str, length=-1) Write the string str at the absolute vim screen coordinate (row, col) using the attribute attr. The optional length parameter can be used to write only a part of the string. The string str must be encoded so that it matches the vim 'encoding' setting. getHighlightAttr(syntaxName) Get the value of the syntax element syntaxName. The value can be used in subsequent calls to puts. The string syntaxName must be encoded so that it matches the vim 'encoding' setting. Does this fit in with the Python RFC? I haven't heard requests from users for this functionality. Also, it appears that after using this it requires Vim to redraw the screen, since it is unaware of what has been drawn. -- hundred-and-one symptoms of being an internet addict: 51. You put a pillow case over your laptop so your lover doesn't see it while you are pretending to catch your breath. /// 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/groups/opt_out.
One more Python bug
This item has been in the todo list for a very long time: Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) It's nasty, I have to kill -9 Vim to get out. It appears Python tries reading from a file descriptor in a way that it doesn't work and CTRL-C doesn't get us out. Does anyone have an idea to fix this, or work around it? Or at least make it fail, so that Vim doesn't freeze? -- Never go to the toilet in a paperless office. /// 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/groups/opt_out.
Patch 7.3.1103
{ copy_sub(&m->norm, &t->subs.norm); #ifdef FEAT_SYN_HL ! copy_sub(&m->synt, &t->subs.synt); #endif } nfa_match = TRUE; --- 3905,3912 { copy_sub(&m->norm, &t->subs.norm); #ifdef FEAT_SYN_HL ! if (nfa_has_zsubexpr) ! copy_sub(&m->synt, &t->subs.synt); #endif } nfa_match = TRUE; *** *** 4024,4035 /* Have to clear the listid field of the NFA nodes, so that * nfa_regmatch() and addstate() can run properly after * recursion. */ ! nfa_save_listids(start, listids); ! nfa_set_null_listids(start); nfa_endp = endposp; ! result = nfa_regmatch(t->state->out, submatch, m); ! nfa_set_neg_listids(start); ! nfa_restore_listids(start, listids); /* restore position in input text */ reginput = save_reginput; --- 4002,4011 /* Have to clear the listid field of the NFA nodes, so that * nfa_regmatch() and addstate() can run properly after * recursion. */ ! nfa_save_listids(prog, listids); nfa_endp = endposp; ! result = nfa_regmatch(prog, t->state->out, submatch, m); ! nfa_restore_listids(prog, listids); /* restore position in input text */ reginput = save_reginput; *** *** 4665,4671 --- 4641,4652 #ifdef FEAT_SYN_HL /* Clear the external match subpointers if necessary. */ if (prog->reghasz == REX_SET) + { + nfa_has_zsubexpr = TRUE; need_clear_zsubexpr = TRUE; + } + else + nfa_has_zsubexpr = FALSE; #endif #ifdef ENABLE_LOG *** *** 4694,4700 clear_sub(&m.synt); #endif ! if (nfa_regmatch(start, &subs, &m) == FALSE) return 0; cleanup_subexpr(); --- 4675,4681 clear_sub(&m.synt); #endif ! if (nfa_regmatch(prog, start, &subs, &m) == FALSE) return 0; cleanup_subexpr(); *** ../vim-7.3.1102/src/version.c 2013-06-02 19:22:05.0 +0200 --- src/version.c 2013-06-02 21:24:50.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1103, /**/ -- hundred-and-one symptoms of being an internet addict: 53. To find out what time it is, you send yourself an e-mail and check the "Date:" field. /// 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/groups/opt_out.
Re: FW: use of vim signs
Christian Brabandt wrote: > On So, 02 Jun 2013, Bram Moolenaar wrote: > > > There is too much discussion about this. I think the current behavior > > is OK and does not have enough disadvantage to justify adding yet > > another option. > > Note, that latest patch I sent, does not require an extra option, is > rather small, makes the code much more readable (imho) and we can even > get rid of test89. You mean the patch you sent on May 30? I don't see anybody responding that they like that solution. -- hundred-and-one symptoms of being an internet addict: 52. You ask a plumber how much it would cost to replace the chair in front of your computer with a toilet. /// 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/groups/opt_out.
Patch 7.3.1104
Patch 7.3.1104 Problem:New regexp engine does not handle "~". Solution: Add support for "~". Files: src/regexp_nfa.c, src/testdir/test24.in, src/testdir/test24.ok *** ../vim-7.3.1103/src/regexp_nfa.c2013-06-02 21:30:00.0 +0200 --- src/regexp_nfa.c2013-06-02 22:00:21.0 +0200 *** *** 829,837 EMSGN(_(e_misplaced), no_Magic(c)); return FAIL; ! case Magic('~'):/* previous substitute pattern */ ! /* TODO: Not supported yet */ ! return FAIL; case Magic('1'): case Magic('2'): --- 829,854 EMSGN(_(e_misplaced), no_Magic(c)); return FAIL; ! case Magic('~'): ! { ! char_u *lp; ! ! /* Previous substitute pattern. !* Generated as "\%(pattern\)". */ ! if (reg_prev_sub == NULL) ! { ! EMSG(_(e_nopresub)); ! return FAIL; ! } ! for (lp = reg_prev_sub; *lp != NUL; mb_cptr_adv(lp)) ! { ! EMIT(PTR2CHAR(lp)); ! if (lp != reg_prev_sub) ! EMIT(NFA_CONCAT); ! } ! EMIT(NFA_NOPEN); ! break; ! } case Magic('1'): case Magic('2'): *** ../vim-7.3.1103/src/testdir/test24.in 2010-08-15 21:57:29.0 +0200 --- src/testdir/test24.in 2013-06-02 22:03:23.0 +0200 *** *** 44,49 --- 44,56 :s/^\(\h\w*\%(->\|\.\)\=\)\+=/XX/ :s/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/ + + :s/aaa/xyz/ + + :s/~/bcd/ + + :s/~\+/BB/ + :" :?start?,$w! test.out :qa! ENDTEST *** *** 77,79 --- 84,89 xx an file xx x= 9; hh= 77; + aaa + xyz + bcdbcdbcd *** ../vim-7.3.1103/src/testdir/test24.ok 2010-08-15 21:57:29.0 +0200 --- src/testdir/test24.ok 2013-06-02 22:03:36.0 +0200 *** *** 27,29 --- 27,32 xx an A xx XX 9; YY 77; + xyz + bcd + BB *** ../vim-7.3.1103/src/version.c 2013-06-02 21:30:00.0 +0200 --- src/version.c 2013-06-02 22:07:20.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1104, /**/ -- Q: What is a patch 22? A: A patch you need to include to make it possible to include patches. /// 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/groups/opt_out.
Patch 7.3.1105
reginput = regline; ! } } ! /* Call nfa_regmatch() to check if the current concat matches !* at this position. The concat ends with the node !* NFA_END_INVISIBLE */ ! if (listids == NULL) { ! listids = (int *)lalloc(sizeof(int) * nstate, TRUE); ! if (listids == NULL) ! { ! EMSG(_("E878: (NFA) Could not allocate memory for branch traversal!")); ! return 0; ! } } ! #ifdef ENABLE_LOG ! if (log_fd != stderr) ! fclose(log_fd); ! log_fd = NULL; ! #endif ! /* Have to clear the listid field of the NFA nodes, so that !* nfa_regmatch() and addstate() can run properly after !* recursion. */ ! nfa_save_listids(prog, listids); ! nfa_endp = endposp; ! result = nfa_regmatch(prog, t->state->out, submatch, m); ! nfa_restore_listids(prog, listids); ! ! /* restore position in input text */ ! reginput = save_reginput; ! regline = save_regline; ! reglnum = save_reglnum; ! nfa_match = save_nfa_match; ! nfa_endp = save_nfa_endp; - #ifdef ENABLE_LOG - log_fd = fopen(NFA_REGEXP_RUN_LOG, "a"); - if (log_fd != NULL) - { - fprintf(log_fd, "\n"); - fprintf(log_fd, "FINISHED RUNNING nfa_regmatch() recursively\n"); - fprintf(log_fd, "MATCH = %s\n", result == TRUE ? "OK" : "FALSE"); - fprintf(log_fd, "\n"); - } - else - { - EMSG(_("Could not open temporary log file for writing, displaying on stderr ... ")); - log_fd = stderr; - } - #endif /* for \@! it is a match when result is FALSE */ if (result != t->state->negated) { --- 4010,4066 } case NFA_END_INVISIBLE: ! /* !* This is only encountered after a NFA_START_INVISIBLE or * NFA_START_INVISIBLE_BEFORE node. * They surround a zero-width group, used with "\@=", "\&", * "\@!", "\@<=" and "\@se_u.pos.lnum, ! (int)(reginput - regline), ! nfa_endp->se_u.pos.col); else ! fprintf(log_fd, "Current col: %d, endp col: %d\n", ! (int)(reginput - regline), ! (int)(nfa_endp->se_u.ptr - reginput)); } + #endif + /* It's only a match if it ends at "nfa_endp" */ + if (nfa_endp != NULL && (REG_MULTI + ? (reglnum != nfa_endp->se_u.pos.lnum + || (int)(reginput - regline) + != nfa_endp->se_u.pos.col) + : reginput != nfa_endp->se_u.ptr)) + break; ! /* do not set submatches for \@! */ ! if (!t->state->negated) { ! copy_sub(&m->norm, &t->subs.norm); ! #ifdef FEAT_SYN_HL ! if (nfa_has_zsubexpr) ! copy_sub(&m->synt, &t->subs.synt); ! #endif } ! nfa_match = TRUE; ! break; ! ! case NFA_START_INVISIBLE: ! case NFA_START_INVISIBLE_BEFORE: ! result = recursive_regmatch(t->state, prog, submatch, m, ! &listids); /* for \@! it is a match when result is FALSE */ if (result != t->state->negated) { *** *** 4056,4067 #endif /* t->state->out1 is the corresponding END_INVISIBLE node; !* Add it to the current list (zero-width match). */ addstate_here(thislist, t->state->out1->out, &t->subs, &listidx); } break; - } case NFA_BOL: if (reginput == regline) --- 4071,4081 #endif /* t->state->out1 is the corresponding END_INVISIBLE node; !
Re: Patch 7.3.10
Ben Fritz wrote: > On Sunday, June 2, 2013 7:27:57 AM UTC-5, Bram Moolenaar wrote: > > > > > > This is much faster: > > > > > > > > [<]\@2<=[^ /!?<>"']\+ > > > > I didn't know you could do that! I have an older Vim installed on this > computer currently...is this a new feature, or just undocumented? Introduced in patch 7.3.1037. Thus it can only be used in runtime files included with the upcoming Vim 7.4. Look-behind matches are still slow, because of all the overhead, but with this limit it's at least somewhat less slow. -- ERROR 047: Keyboard not found. Press RETURN to continue. /// 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/groups/opt_out.
Re: Patch to add the :cdo and :ldo commands
Yegappan Lakshmanan wrote: > I am attaching a patch to add the :cdo and :ldo commands. The :cdo command > can be used to execute commands over all the buffers in the quickfix list. > The :ldo command can be used to execute commands over all the buffers in > the location list. These are similar to the existing :bufdo, :windo > and :tabdo commands. Thanks. I'll add it in the todo list. -- Be thankful to be in a traffic jam, because it means you own a car. /// 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/groups/opt_out.
Re: FW: use of vim signs
Glts wrote: > On Sunday, June 2, 2013 9:30:20 PM UTC+2, Bram Moolenaar wrote: > > Christian Brabandt wrote: > > > > > Note, that latest patch I sent, does not require an extra option, is > > > rather small, makes the code much more readable (imho) and we can even > > > get rid of test89. > > > > You mean the patch you sent on May 30? > > I don't see anybody responding that they like that solution. > > This is exactly one of the reasons people are calling for a proper issue > tracker on BitBucket or similar. I remember reading one dismissive and > three favourable reactions to this idea either on vim_dev or on vim_use. > On an issue tracker these would have been impossible to overlook. > > I proposed this originally but I'm still undecided. I think it would be > good to hear a few more voices. There already is an issue tracker. -- hundred-and-one symptoms of being an internet addict: 54. You start tilting your head sideways to smile. :-) /// 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/groups/opt_out.
Re: [patch] small bug with gn
Christian Brabandt wrote: > here is a patch that fixes a bug with gn when the match is only a > single char width. Thanks! I'll put it in the todo list. Bonus points for writing a test. -- hundred-and-one symptoms of being an internet addict: 56. You leave the modem speaker on after connecting because you think it sounds like the ocean wind...the perfect soundtrack for "surfing the net". /// 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/groups/opt_out.
Re: Python os.chdir() patch
ZyX wrote: > The last proposal was using '_vim_runtimepath_' special item in sys.path > alongside with import hooks. I can hardly call this a consensus because > last my argument about why vim should use this magic was not replied to by > anybody. I wonder if this gives sufficient flexibility. I suppose it's fine as a default, but what if the user wants a different order? > I do not remember whether it was discussed earlier, but for python/ > directories here is a proposal: python/ or pythonx/ is searched for modules > in both pythons, python2/ (or python/) and python3/ are searched only for > specific python versions. (pythonx/ appeared only after a patch from @Marc > Weber; second alternative (pythonx/ and python/) should be used in case > idea from this patch is considered good.) I suppose "pythonx" would be searched after python2 (for Python 2.x) and python3 (for Python 3.x). That seems like a straightforward solution. So, how do we implement this? -- Over the years, I've developed my sense of deja vu so acutely that now I can remember things that *have* happened before ... /// 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/groups/opt_out.
Re: glob() and globpath() can return incorrect results with escaped characters
Adnan Zafar wrote: > Hi vim_dev! > > Consider the following commands (globpath is used but the same happens > with glob): > > :echo globpath(&rtp, '{') > :echo globpath(&rtp, '\{') > :echo globpath(&rtp, '{*') > :echo globpath(&rtp, '\{*') > > The first command returns correct results, but it shells out on Unix > and that can be slow. The second doesn't shell out, but it returns all > possible results instead of only those that exist. The third and > fourth both return correct results but both also shell out. Similar > situations happen with backticks, single quotes, and dollar signs. > > The attached patch both (I hope) ensures glob and globpath only return > files that exist, and additionally it no longer shells out when one of > these characters is escaped with a backslash. Instead of calling > mch_expand_wildcards from gen_expand_wilcdards whenever one of these > characters is simply present in the glob, it checks whether or not the > character is escaped first. > > This is my first time poking around Vim's source, and my C is rusty. I > hope I did everything correctly. Thanks, everyone, for all the work > you do on Vim! Thanks. This is tricky stuff, can you please add a test? One that partly fails before this patch. I know that's not easy, but manually testing this is also not a good idea. It's OK if the test only works on Unix. -- hundred-and-one symptoms of being an internet addict: 55. You ask your doctor to implant a gig in your brain. /// 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/groups/opt_out.
Re: Patch for variable tabstops
Christian Brabandt wrote: > On So, 02 Jun 2013, Bram Moolenaar wrote: > > > > > Christian Brabandt wrote: > > > > > Bram, > > > > > > will this patch at least end up in todo.txt? > > > > I thought it was there, but I can't find it. > > Where is the patch? > > It was attached to the mail, to which I responded. I keep track of patches by the author and the day the email was sent. You can see that in the todo list. > > Note that this patch has a very high chance of causing new bugs, thus a > > low chance of getting included soon. At least we need to fix the bugs > > for conceal mode first. > > Are there still any issues with conceal mode, that don't have patches > yet? Yep, including some nasty ones, such as the cursor being in the wrong position. From the todo list: With concealed text mouse click doesn't put the cursor in the right position. (Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly, need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called. Your patch is almost 2 years old... -- Keyboard not found. Think ENTER to continue. /// 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/groups/opt_out.
Re: Python os.chdir() patch
ZyX wrote: > On Jun 3, 2013 1:09 AM, "Bram Moolenaar" wrote: > > > > ZyX wrote: > > > > > The last proposal was using '_vim_runtimepath_' special item in sys.path > > > alongside with import hooks. I can hardly call this a consensus because > > > last my argument about why vim should use this magic was not replied to > by > > > anybody. > > > > I wonder if this gives sufficient flexibility. I suppose it's fine as a > > default, but what if the user wants a different order? > > If user wants different order with _vim_runtimepath_ he just changes the > &rtp. But what if user wants different order with your initial proposal? Well, usually it should make sense to look for Python modules in the same order as for plugins. I suppose in the rare case that this isn't what the user wants he can remove _vim_runtimepath_ and just add whatever he likes in sys.path. > > > I do not remember whether it was discussed earlier, but for python/ > > > directories here is a proposal: python/ or pythonx/ is searched for > modules > > > in both pythons, python2/ (or python/) and python3/ are searched only > for > > > specific python versions. (pythonx/ appeared only after a patch from > @Marc > > > Weber; second alternative (pythonx/ and python/) should be used in case > > > idea from this patch is considered good.) > > > > I suppose "pythonx" would be searched after python2 (for Python 2.x) and > > python3 (for Python 3.x). That seems like a straightforward solution. > > > > So, how do we implement this? > > Implementation should be pretty easy once we agree on the details. > Searching pythonx/ after specific directories is fine. Let's have this soon, so that there is still time for trying it out, discussion and possibly fixing. -- Creating the world with Emacs: M-x let-there-be-light Creating the world with Vim: :make world /// 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/groups/opt_out.
Re: Latest changes to regexengine have made vim really slow
Axel Bender wrote: > I could probably live with the slowing down if it only affected re=2. > But it also affects re=1 which is not acceptable. The effect is quite > noticeable, 13 to 20 secs that's a lot. I hope that Bram goes into > that... There are no changes to the old regexp engine that would make it slower. Note that you need to set 'regexpengine' before opening a file, syntax items are cached. If you can reproduce slowness with 'regexpengine' set to 1, please let us know how to reproduce that. Please make sure the context (esp. any plugins, fold settings, etc.) are identical. Different runtime files also matter a lot. -- hundred-and-one symptoms of being an internet addict: 57. You begin to wonder how on earth your service provider is allowed to call 200 hours per month "unlimited." /// 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/groups/opt_out.
Re: FW: use of vim signs
ZyX wrote: > On Jun 3, 2013 1:09 AM, "Bram Moolenaar" wrote: > > > > > > Glts wrote: > > > > > On Sunday, June 2, 2013 9:30:20 PM UTC+2, Bram Moolenaar wrote: > > > > Christian Brabandt wrote: > > > > > > > > > Note, that latest patch I sent, does not require an extra option, is > > > > > rather small, makes the code much more readable (imho) and we > > > > > can even get rid of test89. > > > > > > > > You mean the patch you sent on May 30? > > > > I don't see anybody responding that they like that solution. > > > > > > This is exactly one of the reasons people are calling for a proper issue > > > tracker on BitBucket or similar. I remember reading one dismissive and > > > three favourable reactions to this idea either on vim_dev or on vim_use. > > > On an issue tracker these would have been impossible to overlook. > > > > > > I proposed this originally but I'm still undecided. I think it would be > > > good to hear a few more voices. > > > > There already is an issue tracker. > > I can hardly call what Google code has an issue tracker. It lacks basic > functionality. It does not even support formatting and attachments, not to > mention more advanced things like components. Or such a thing like finely > looking UI. It is not surprising most people do not want to use it. It does support attachments. > And there are no PR's here. Other issue tracker problems are tolerable, > absence of PR's and attachments makes it impossible to hold patches there > making it useless when it comes to resolving the mentioned problem. What's a PR? Problem Report? I don't think that the functionality of the Issue Tracker is relevant. What matters is that the discussions happen on the vim-dev maillist, that's where the developers are. I don't see that changing no matter how beautiful or functional any issue tracker would be. For me, the main issue with Issue trackers is that I can't edit them with Vim. Switching to a browser and having to click around slows down my work. That's why I use the todo list. -- hundred-and-one symptoms of being an internet addict: 58. You turn on your computer and turn off your wife. /// 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/groups/opt_out.
Patch 7.3.1106
nfa_listid + 1; ! neglist->id = nfa_listid + 1; #ifdef ENABLE_LOG fprintf(log_fd, "--\n"); *** *** 4843,4848 --- 4878,4885 nfa_has_zend = prog->has_zend; nfa_has_backref = prog->has_backref; nfa_nsubexpr = prog->nsubexp; + nfa_listid = 1; + nfa_alt_listid = 2; #ifdef DEBUG nfa_regengine.expr = prog->pattern; #endif *** *** 4851,4857 for (i = 0; i < nstate; ++i) { prog->state[i].id = i; ! prog->state[i].lastlist = 0; } retval = nfa_regtry(prog, col); --- 4888,4895 for (i = 0; i < nstate; ++i) { prog->state[i].id = i; ! prog->state[i].lastlist[0] = 0; ! prog->state[i].lastlist[1] = 0; } retval = nfa_regtry(prog, col); *** ../vim-7.3.1105/src/version.c 2013-06-02 22:37:39.0 +0200 --- src/version.c 2013-06-03 12:13:15.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1106, /**/ -- hundred-and-one symptoms of being an internet addict: 59. Your wife says communication is important in a marriage...so you buy another computer and install a second phone line so the two of you can chat. /// 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/groups/opt_out.
Re: [patch] support multi-byte 'fillchars' in custom 'statusline'
Christian Wellenbrock wrote: > Hi vim_dev, > > I recently noticed the following inconsistency regarding the 'fillchars' and > 'statusline options: > > - multi-byte 'fillchars' work with default 'statusline': > vim -u NONE -c "set ls=2 fcs=stl:●" > [No Name] [+]●● > > - single-byte 'fillchars' work with custom 'statusline': > vim -u NONE -c "set ls=2 fcs=stl:x stl=a%=b" > axb > > - multi-byte 'fillchars' with custom 'statusline' fall back to '-': > vim -u NONE -c "set ls=2 fcs=stl:● stl=a%=b" > a-b > > I attached a patch that yields the following statusline for the last > invocation: > a●b > > This is my first vim contribution. Some questions I asked myself in > the process: > > 1. Is it ok to introduce a local variable here or should it be inlined > instead? > 2. Would on big #if-#else-block be preferable to those two smaller ones? > 3. Should I check `has_mbyte` in the #if-#else-blocks? Thanks for the patch. Mostly looks good. I wonder if there is a way to test this. It's probably tricky, requires getting what's actually on the screen (which we can't do yet). Local variables need to be declared at the start of the block. Older compilers don't allow inline declarations. You snould check has_mbyte before calling mb_char2len(). There is no macro in macros.h yet, like there is MB_PTR2LEN(). Perhaps we should add one. -- Q: Should I clean my house or work on Vim? A: Whatever contains more bugs. /// 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/groups/opt_out.
Re: [patch] support multi-byte 'fillchars' in custom 'statusline'
Christian Wellenbrock wrote: > On Monday, June 3, 2013 9:29:03 AM UTC+2, mattn wrote: > > On Monday, June 3, 2013 7:33:39 AM UTC+9, Christian Wellenbrock wrote: > > > > > I recently noticed the following inconsistency regarding the > > > 'fillchars' and 'statusline options: [...] > > I don't make sure this patch. This patch seems not modified > > screen.c, Is this support double width characters? > > > > Thanks. > > Yes, this patch does not modify screen.c, because screen.c is already > capable of handling multi-byte characters, as you can see in the first > of my three examples. > > I have not tried using it with double width characters. The original > intent was to support single width multi-byte characters. I don't know > if double width character support is as easy to implement. I would think double-width fill characters are not useful. We could just mention in the docs that they won't work. Better is to reject them and fall back to "-" as before. -- Time is money. Especially if you make clocks. /// 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/groups/opt_out.
Re: Patch for variable tabstops
Christian Brabandt wrote: > On Sun, June 2, 2013 23:09, Bram Moolenaar wrote: > > Christian Brabandt wrote: > >> On So, 02 Jun 2013, Bram Moolenaar wrote: > > [variable tabstop patch] > > >> > I thought it was there, but I can't find it. > >> > Where is the patch? > >> > >> It was attached to the mail, to which I responded. > > > > I keep track of patches by the author and the day the email was sent. > > You can see that in the todo list. > > I thought you would do something like this. That's why I said, I > attached the latest version of the patch from the vim_extended > repository to the mail sent on thursday (ID: > 20130530113806.gd14...@256bit.org) Eh, I said "author and date". I don't like puzzles. And I need the original author, not the person who resent someone else's work. -- hundred-and-one symptoms of being an internet addict: 63. You start using smileys in your snail mail. /// 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/groups/opt_out.
Re: 1105 updated and AttributeError
Ashwin Sathya wrote: > Hi, > I run windows 8 64 bit, with Vim 32 bit latest from > http://tuxproject.de/projects/vim/ patched till 1105. > With python 32 bit 2.7.5 > > When i do a ":py import os" i get the following error message > "AttributeError: 'module' object has no attribute 'fchdir'" > > Is this known bug ? Yes, ZyX sent a patch for this. -- hundred-and-one symptoms of being an internet addict: 60. As your car crashes through the guardrail on a mountain road, your first instinct is to search for the "back" button. /// 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/groups/opt_out.
Re: Latest changes to regexengine have made vim really slow
Charles Peacech wrote: > On Mon, Jun 3, 2013 at 3:21 PM, Bram Moolenaar wrote: > > > > Axel Bender wrote: > > > >> I could probably live with the slowing down if it only affected re=2. > >> But it also affects re=1 which is not acceptable. The effect is quite > >> noticeable, 13 to 20 secs that's a lot. I hope that Bram goes into > >> that... > > > > There are no changes to the old regexp engine that would make it slower. > > Note that you need to set 'regexpengine' before opening a file, syntax > > items are cached. > > > > If you can reproduce slowness with 'regexpengine' set to 1, please let > > us know how to reproduce that. Please make sure the context (esp. any > > plugins, fold settings, etc.) are identical. Different runtime files > > also matter a lot. > > There is a clear slowdown using regexpengine=0 with v7-3-1088 (slow) > and v7-3-1087 (faster). The speed difference when paging up/down is > noticeable enough using the files in the attachment above. I don't > notice any slowdown with regexpengine=1. Using zero for 'regexpengine' means automatic selection. Now that the new engine supports most features it's most often selecting the new engine, but still not 100%. I am still figuring out what exactly causes the slowness and finding ways to make improvements. Once most of that is done I can make the automatic selection use the old engine for patterns that it can handle faster. It's good if you can help finding bugs in the new engine. If you can't live with the slowness, set 'regexpengine' to one. -- hundred-and-one symptoms of being an internet addict: 61. Your best friends know your e-mail address, but neither your phone number nor the address where you live. /// 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/groups/opt_out.
Re: Latest changes to regexengine have made vim really slow
Axel Bender wrote: > Sorry Bram, I wasn't aware of this ("... Note that you need to set > 'regexpengine' before opening a file ...") - maybe this should go into > the docs? > > Anyway, making the above mentioned setting in .vimrc brings back the > 'good old times' ;-) > > Just for curiosity: > > 1) What ist NFA good for if it is so slow? The NFA engine has some overhead, but it's more or less linear with the size of the pattern and the text. The old engine has lower overhead, but for some patterns it rises exponentially. Especially when a pattern could match in many ways. > 2) Will NFA replace (at some time in the future) the current engine? No, they will need to co-exist. For simple patterns the old engine is better, for complex patterns the new engine is better. Problem is that some features, such as the look-behind matching, don't fit with the NFA engine very well. I need to do a few inventions to make this work better. I already made back-references work, something that an NFA engine normally can't do. -- hundred-and-one symptoms of being an internet addict: 62. If your doorbell rings, you think that new mail has arrived. And then you're disappointed that it's only someone at the door. /// 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/groups/opt_out.
Re: Curiosity in the NFA code
Ron Aaron wrote: > I'm sure there's a reason, but I wonder: > > why, in regexp_nfa.c "nfa_recognize_char_class()", is the "config" > using chars instead of integer bitmaps? I would expect bitmaps to be > faster (as well as taking less space). Yeah, one of the things that still needs to be improved. When using an int it could just use switch instead of looping to find the match in config[]. Also note that it's put on the stack, it should be static. If needed at all, possibly using #define. So, if someone wants to work on this, please write a test, verify that the test passes, then change to code to a more efficient version. -- hundred-and-one symptoms of being an internet addict: 65. The last time you looked at the clock it was 11:30pm, and in what seems like only a few seconds later, your sister runs past you to catch her 7am school bus. /// 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/groups/opt_out.
Re: One more Python bug
Charles Peacech wrote: > On Mon, Jun 3, 2013 at 1:06 AM, Bram Moolenaar wrote: > > > > This item has been in the todo list for a very long time: > > > > Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) > > > > It's nasty, I have to kill -9 Vim to get out. > > > > It appears Python tries reading from a file descriptor in a way that it > > doesn't work and CTRL-C doesn't get us out. Does anyone have an idea to > > fix this, or work around it? Or at least make it fail, so that Vim > > doesn't freeze? > > Hi, > > Why don't just override it with something that work > > :py def raw_input(str): vim.command('call confirm(' + str + ')') And how is this done in the Python interface initialization? -- hundred-and-one symptoms of being an internet addict: 66. You create a homepage with the impression to cure the afflicted...but your hidden agenda is to receive more e-mail. /// 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/groups/opt_out.
Re: Patch for variable tabstops
Christian Brabandt wrote: > On Mon, June 3, 2013 16:02, Bram Moolenaar wrote: > > Eh, I said "author and date". I don't like puzzles. And I need the > > original author, not the person who resent someone else's work. > > Ah, I misunderstood you. I think it startet here: > http://thread.gmane.org/gmane.editors.vim.devel/17469/focus=17637 > > Various updates have been postet later and Matthew Winn > even commented on this thread here (so he can correct me, if I am wrong). Eh, that post is from 2007. So which is the most recent one from the original author with the right patch? I think you missed the bit where I said I don't like puzzles. I like solutions though. -- hundred-and-one symptoms of being an internet addict: 67. Your hard drive crashes. You haven't logged in for two hours. You start to twitch. You pick up the phone and manually dial your ISP's access number. You try to hum to communicate with the modem. You succeed. /// 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/groups/opt_out.
Re: FW: use of vim signs
Ben Fritz wrote: > On Monday, June 3, 2013 4:16:12 AM UTC-5, Bram Moolenaar wrote: > > ZyX wrote: > > > > > On Jun 3, 2013 1:09 AM, "Bram Moolenaar" wrote: > > > > > > Glts wrote: > > > > > > > On Sunday, June 2, 2013 9:30:20 PM UTC+2, Bram Moolenaar wrote: > > > > > > > > Christian Brabandt wrote: > > [...] > > > And there are no PR's here. Other issue tracker problems are tolerable, > > > absence of PR's and attachments makes it impossible to hold patches there > > > making it useless when it comes to resolving the mentioned problem. > > > > What's a PR? Problem Report? > > I think he is referring to a "pull request", so that somebody can fix > an issue in a clone of the repository, and request that you pull in > and merge the changes. > > I didn't get the impression that was something you'd want to do anyway. > > But maybe you'd start accepting Hg "bundle"s? Then there would be no > doubt where the changes were based on and less bitrot compared to a > patch (though a merge or rebase will be needed). Context diffs work just fine. Anybody with basic Linux tools can use them, no need to figure out hg or git commands and setting up an environment where they work. I hardly ever had a problem with "bitrot", except for refactorings where nothing would help. [...] > One problem with the todo list, is that it is not up-to-date until you > publish runtime files periodically. So sometimes it is hard to tell > whether you noticed a patch or fixed a bug in a later version. And, > once a bug goes away from the TODO list, nobody can find it later to > see that it was an issue but has been fixed (and when). Keeping the TODO list up-to-date is less work than updating stuff on some website. Whatever issue tracker there is, it's not going to make MY work more efficient. And since I'm the bottleneck that's what matters. There was a promise from someone to keep the Issue Tracker up to date, close fixed issues and so on, but that doesn't really appear to happen. I don't really have time to do that on top of everything else. In an ideal world everything happens wonderfully, we'll have to live with the real world. -- hundred-and-one symptoms of being an internet addict: 68. Your cat always puts viruses on your dogs homepage /// 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/groups/opt_out.
Re: Patch for variable tabstops
Christian Brabandt wrote: > On Mon, June 3, 2013 16:40, Bram Moolenaar wrote: > > Eh, that post is from 2007. So which is the most recent one from the > > original author with the right patch? > > I don't know, when Matthew posted the most recent patch. > As far as I know, Lech has updated the patch later, but it > went unnoticed by vim-dev to the vim-extended repository. > http://thread.gmane.org/gmane.editors.vim.devel/23107/focus=25345 > > From vim_extended I picked it up, merged it with the latest changes > (updated it to also include add support to optwin.vim) and posted it. > > Note, that the original patch doesn't even apply anymore, since > so many changes have happened in between. > > Matthew (CC'ed): Correct me if I am wrong. Perhaps now it's clear why this wasn't on the list of patches that are ready to be considered for inclusion? > > I think you missed the bit where I said I don't like puzzles. > > ;) > > > I like solutions though. > > Does this make it clearer? Not really, I would still have to hunt down messages in the archive, look at patches to find one that looks like it would work, then figure out who wrote this anyway... But let this not be an invitation for someone to do all this work, because I'm just going to add a line in the todo list and it will sit there for a while. At least until lots of bugs have been fixed before I dare including a feature that most likely will cause more bugs. No matter how nice that feature is. -- hundred-and-one symptoms of being an internet addict: 69. Yahoo welcomes you with your own start page /// 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/groups/opt_out.
Patch 7.3.1107
Patch 7.3.1107 Problem:Compiler warnings for unused variables. Solution: Put the variables inside #ifdef. Files: src/regexp.c, src/regexp_nfa.c *** ../vim-7.3.1106/src/regexp.c2013-06-02 15:01:51.0 +0200 --- src/regexp.c2013-06-03 19:38:46.0 +0200 *** *** 361,368 --- 361,370 static char_u e_unmatchedpp[] = N_("E53: Unmatched %s%%("); static char_u e_unmatchedp[] = N_("E54: Unmatched %s("); static char_u e_unmatchedpar[] = N_("E55: Unmatched %s)"); + #ifdef FEAT_SYN_HL static char_u e_z_not_allowed[] = N_("E66: \\z( not allowed here"); static char_u e_z1_not_allowed[] = N_("E67: \\z1 et al. not allowed here"); + #endif #define NOT_MULTI 0 #define MULTI_ONE 1 *** ../vim-7.3.1106/src/regexp_nfa.c2013-06-03 12:17:00.0 +0200 --- src/regexp_nfa.c2013-06-03 19:39:55.0 +0200 *** *** 237,244 --- 237,246 /* NFA regexp \1 .. \9 encountered. */ static int nfa_has_backref; + #ifdef FEAT_SYN_HL /* NFA regexp has \z( ), set zsubexpr. */ static int nfa_has_zsubexpr; + #endif /* Number of sub expressions actually being used during execution. 1 if only * the whole match (subexpr 0) is used. */ *** *** 420,426 if (*p == '^') { not = TRUE; ! p ++; } while (p < end) --- 422,428 if (*p == '^') { not = TRUE; ! p++; } while (p < end) *** ../vim-7.3.1106/src/version.c 2013-06-03 12:17:00.0 +0200 --- src/version.c 2013-06-03 19:39:34.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1107, /**/ -- hundred-and-one symptoms of being an internet addict: 70. ISDN lines are added to your house on a hourly basis /// 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/groups/opt_out.
Patch 7.3.1108
Patch 7.3.1108 Problem:Error message for os.fchdir() (Charles Peacech) Solution: Clear the error. (ZyX) Files: src/if_py_both.h *** ../vim-7.3.1107/src/if_py_both.h2013-06-02 18:54:16.0 +0200 --- src/if_py_both.h2013-06-03 20:01:23.0 +0200 *** *** 5413,5418 --- 5413,5420 if (PyObject_SetAttrString(os, "fchdir", get_attr(m, "fchdir"))) return -1; } + else + PyErr_Clear(); return 0; } *** ../vim-7.3.1107/src/version.c 2013-06-03 19:41:01.0 +0200 --- src/version.c 2013-06-03 20:00:42.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1108, /**/ -- hundred-and-one symptoms of being an internet addict: 71. You wonder how people walk /// 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/groups/opt_out.
Re: [patch] dependencies of if_py_both.h are missing
Ken Takata wrote: > Dependencies of if_py_both.h are missing in Makefiles for Windows > such as Make_mvc.mak, Make_ming.mak and etc. > Attached patch fixes this. Thanks! -- hundred-and-one symptoms of being an internet addict: 73. You give your dog used motherboards instead of bones /// 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/groups/opt_out.
Patch 7.3.1109
Patch 7.3.1109 Problem:Building on MS-Windows doesn't see changes in if_py_both.h. Solution: Add a dependency. (Ken Takata) Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak *** ../vim-7.3.1108/src/Make_bc5.mak2013-02-26 14:56:24.0 +0100 --- src/Make_bc5.mak2013-06-03 20:09:58.0 +0200 *** *** 1006,1015 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \ $(PERL)\lib\ExtUtils\typemap if_perl.xs > $@ ! $(OBJDIR)\if_python.obj: if_python.c python.lib $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c ! $(OBJDIR)\if_python3.obj: if_python3.c python3.lib $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c $(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib --- 1006,1015 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \ $(PERL)\lib\ExtUtils\typemap if_perl.xs > $@ ! $(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c ! $(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c $(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib *** ../vim-7.3.1108/src/Make_cyg.mak2013-05-19 19:16:25.0 +0200 --- src/Make_cyg.mak2013-06-03 20:09:58.0 +0200 *** *** 648,657 $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) $(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o ! $(OUTDIR)/if_python.o : if_python.c $(INCL) $(CC) -c $(CFLAGS) -I$(PYTHON)/include $< -o $@ ! $(OUTDIR)/if_python3.o : if_python3.c $(INCL) $(CC) -c $(CFLAGS) -I$(PYTHON3)/include $< -o $@ if_perl.c: if_perl.xs typemap --- 648,657 $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) $(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o ! $(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL) $(CC) -c $(CFLAGS) -I$(PYTHON)/include $< -o $@ ! $(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL) $(CC) -c $(CFLAGS) -I$(PYTHON3)/include $< -o $@ if_perl.c: if_perl.xs typemap *** ../vim-7.3.1108/src/Make_ming.mak 2013-05-19 19:16:25.0 +0200 --- src/Make_ming.mak 2013-06-03 20:09:58.0 +0200 *** *** 721,730 structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \ gui.h ! $(OUTDIR)/if_python.o : if_python.c $(INCL) $(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@ ! $(OUTDIR)/if_python3.o : if_python3.c $(INCL) $(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@ $(OUTDIR)/%.o : %.c $(INCL) --- 721,730 structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \ gui.h ! $(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL) $(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@ ! $(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL) $(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@ $(OUTDIR)/%.o : %.c $(INCL) *** ../vim-7.3.1108/src/Make_mvc.mak2013-05-19 21:03:50.0 +0200 --- src/Make_mvc.mak2013-06-03 20:09:58.0 +0200 *** *** 1113,1122 mzscheme_base.c: $(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base ! $(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL) $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c ! $(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c $(INCL) $(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c $(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h --- 1113,1122 mzscheme_base.c: $(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base ! $(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c if_py_both.h $(INCL) $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c ! $(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c if_py_both.h $(INCL) $(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c $(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h *** ../vim-7.3.1108/src/version.c 2013-06-03 20:04:43.0 +0200 --- src/version.c 2013-06-03 20:10:22.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1109, /**/ -- hundred-and-one symptoms of being an internet addict: 74. Your most erotic dreams are about cybersex /// 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 --
Re: [patch] small bug with gn
Christian Brabandt wrote: > On Sun, June 2, 2013 23:09, Bram Moolenaar wrote: > > Christian Brabandt wrote: > >> here is a patch that fixes a bug with gn when the match is only a > >> single char width. > > > > Thanks! I'll put it in the todo list. > > Bonus points for writing a test. > > Ha! I'll take the bonus points ;) > > (patch already contained a test) I meant: You get bonus points for writing a test. -- Proof techniques #2: Proof by Oddity. SAMPLE: To prove that horses have an infinite number of legs. (1) Horses have an even number of legs. (2) They have two legs in back and fore legs in front. (3) This makes a total of six legs, which certainly is an odd number of legs for a horse. (4) But the only number that is both odd and even is infinity. (5) Therefore, horses must have an infinite number of legs. /// 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/groups/opt_out.
Re: Curiosity in the NFA code
Dominique Pelle wrote: > Bram Moolenaar wrote: > > > > > Ron Aaron wrote: > > > >> I'm sure there's a reason, but I wonder: > >> > >> why, in regexp_nfa.c "nfa_recognize_char_class()", is the "config" > >> using chars instead of integer bitmaps? I would expect bitmaps to be > >> faster (as well as taking less space). > > > > Yeah, one of the things that still needs to be improved. > > When using an int it could just use switch instead of looping to find > > the match in config[]. > > > > Also note that it's put on the stack, it should be static. > > If needed at all, possibly using #define. > > > > So, if someone wants to work on this, please write a test, verify that > > the test passes, then change to code to a more efficient version. > > > Please check the attached patch which improves > function nfa_recognize_char_class() as it was suggested. > > I also extended test36 to: > > - test with regexpengine values 0, 1, 2 (instead of just 0) > - test \d and [0-9], \D and [^0-9] (etc) instead of just \d, \D (etc) > in order to make sure we exercise all cases in > function nfa_recognize_char_class(). > > Patch also fixes 2 unrelated typos in comments. > > I don't think that nfa_recognize_char_class() was > a bottleneck so I don't expect significant speed up > but I'd love to be proven wrong :-) Thanks! I'll try it out soon. -- hundred-and-one symptoms of being an internet addict: 77. The phone company asks you to test drive their new PBX system /// 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/groups/opt_out.
Re: Why doesn't Vim listen to SIGINT always?
Marc Weber wrote: > Wired things which I think can happen: > 1) run a viml loop > 2) resize the window > > while viml is in a loop it calls line_breakcheck which in turn calls > ui_breakcheck which calls gui_mch_update which can recieve resize events > which can trigger an au command which can disturb your initial loop ? > > I would not expect vim calling any additional viml while I run :while > true | let dummy=1 | endwhile > > I have no proof yet. Its just something which I think could happen likely. > > Anyway. why doesn't Vim just listen to SIGINT, why does it use > line_breakcheck instead to get notified if the user wants to interrupt viml > code? What would happen on SIGINT, exit Vim? No, there has to be a very controlled way to break out of whatever is currently being done. This does not always mean returning to the main loop. C does not have exceptions. If you have a specific problem, please report it with a reproducible example. -- hundred-and-one symptoms of being an internet addict: 79. All of your most erotic dreams have a scrollbar at the right side. /// 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/groups/opt_out.
Re: FW: use of vim signs
Ben Fritz wrote: > On Sunday, June 2, 2013 3:36:54 PM UTC-5, Grant Farnsworth wrote: > > > - ":set nonu nornu" means: I don't want any line numbers; > > > - ":set nu nornu" means: I want to see only absolute numbers; > > > - ":set nonu rnu" means: I want to see only relative numbers; > > > - ":set nu rnu" means: I want to have the best of both worlds. > > > > In my opinion this is the best solution I have heard. It preserves > > the functionality of what people on both sides of the issue want > > without adding additional options. > > > > I think it actually makes the numbering options in question a little > > *more* intuitive: I recall that I was confused when I started using > > vim because I was not expecting setting nu to also unset rnu and > > vice versa. I guess I was expecting to see both relative numbers > > and absolute numbers if both were set to true, even though it is > > unlikely I would ever want it that way. So to me having both options > > set to true result in a hybrid numbering scheme that includes the > > current absolute number and the other numbers as relative makes > > sense. > > > > I believe this is what Christian's patch does, so count me as a fan. > > Sorry I didn't speak up in support earlier. > > Back on topic: Bram, this method seems to have a good deal of support, > and does not introduce any new options. What do you think? Yeah, it appears this time there is nobody against this solution. -- hundred-and-one symptoms of being an internet addict: 78. You find yourself dialing IP numbers on the phone. /// 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/groups/opt_out.
Patch 7.3.1110
long_u)(reglnum + reg_firstlnum))); if (result) ! addstate_here(thislist, t->state->out, &t->subs, &listidx); break; case NFA_COL: --- 4710,4717 nfa_re_num_cmp(t->state->val, t->state->c - NFA_LNUM, (long_u)(reglnum + reg_firstlnum))); if (result) ! addstate_here(thislist, t->state->out, &t->subs, ! t->pim, &listidx); break; case NFA_COL: *** *** 4566,4572 result = nfa_re_num_cmp(t->state->val, t->state->c - NFA_COL, (long_u)(reginput - regline) + 1); if (result) ! addstate_here(thislist, t->state->out, &t->subs, &listidx); break; case NFA_VCOL: --- 4720,4727 result = nfa_re_num_cmp(t->state->val, t->state->c - NFA_COL, (long_u)(reginput - regline) + 1); if (result) ! addstate_here(thislist, t->state->out, &t->subs, ! t->pim, &listidx); break; case NFA_VCOL: *** *** 4577,4583 reg_win == NULL ? curwin : reg_win, regline, (colnr_T)(reginput - regline)) + 1); if (result) ! addstate_here(thislist, t->state->out, &t->subs, &listidx); break; case NFA_CURSOR: --- 4732,4739 reg_win == NULL ? curwin : reg_win, regline, (colnr_T)(reginput - regline)) + 1); if (result) ! addstate_here(thislist, t->state->out, &t->subs, ! t->pim, &listidx); break; case NFA_CURSOR: *** *** 4586,4592 && ((colnr_T)(reginput - regline) == reg_win->w_cursor.col)); if (result) ! addstate_here(thislist, t->state->out, &t->subs, &listidx); break; default:/* regular character */ --- 4742,4749 && ((colnr_T)(reginput - regline) == reg_win->w_cursor.col)); if (result) ! addstate_here(thislist, t->state->out, &t->subs, ! t->pim, &listidx); break; default:/* regular character */ *** *** 4613,4618 --- 4770,4834 ADD_POS_NEG_STATE(t->state); break; } + + } /* switch (t->state->c) */ + + if (add_state != NULL) + { + if (t->pim != NULL) + { + /* postponed invisible match */ + /* TODO: also do t->pim->pim recursively? */ + if (t->pim->result == NFA_PIM_TODO) + { + #ifdef ENABLE_LOG + fprintf(log_fd, "\n"); + fprintf(log_fd, "==\n"); + fprintf(log_fd, "Postponed recursive nfa_regmatch()\n"); + fprintf(log_fd, "\n"); + #endif + result = recursive_regmatch(t->pim->state, +prog, submatch, m, &listids); + t->pim->result = result ? NFA_PIM_MATCH + : NFA_PIM_NOMATCH; + /* for \@! it is a match when result is FALSE */ + if (result != t->pim->state->negated) + { + /* Copy submatch info from the recursive call */ + copy_sub_off(&t->pim->subs.norm, &m->norm); + #ifdef FEAT_SYN_HL + copy_sub_off(&t->pim->subs.synt, &m->synt); + #endif + } + } + else + { + result = (t->pim->result == NFA_PIM_MATCH); + #ifdef ENABLE_LOG + fprintf(log_fd, "\n"); + fprintf(log_fd, "Using previous recursive nfa_regmatch() result, result == %d\n", t->pim->result); + fprintf(log_fd, "MATCH
Re: Patch 7.3.1110
I wrote: > Patch 7.3.1110 > Problem:New regexp matching: Using \@= and the like can be slow. > Solution: Decide whether to first try matching the zero-wdith part or what > follows, whatever is more likely to fail. > Files:src/regexp_nfa.c This should make syntax highlighting a lot faster. E.g. for Vim help files. If you previously set 'regexpengine' to 1, give it a try without that. -- hundred-and-one symptoms of being an internet addict: 81. At social functions you introduce your husband as "my domain server." /// 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/groups/opt_out.
Re: Patch 7.3.1110
Ron Aaron wrote: > it doesn't appear yet on the ftp site I thought everybody was using the Mercurial repository. I'll push the patch to the ftp site as well. -- hundred-and-one symptoms of being an internet addict: 82. AT&T names you Customer of the Month for the third consecutive time. /// 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/groups/opt_out.
Re: glob() and globpath() can return incorrect results with escaped characters
Adnan Zafar wrote: > On Sun, Jun 2, 2013 at 5:09 PM, Bram Moolenaar wrote: > > > Thanks. This is tricky stuff, can you please add a test? > > One that partly fails before this patch. > > I know that's not easy, but manually testing this is also > > not a good idea. > > It's OK if the test only works on Unix. > > Hi Bram! > > The attached test should fail before the patch and succeed with it. > I'm not sure there's a way to check if glob() shells out, so it just > makes sure correct results are returned. I hope this helps! Thanks! I'll add it to the list of patches to include. -- hundred-and-one symptoms of being an internet addict: 83. Batteries in the TV remote now last for months. /// 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/groups/opt_out.
Re: Slow syntax highlighting with 7.3.1088?
Omoikane wrote: > As of 7.3.1088, VIM and GVIM appears to have gotten very slow at > redrawing files with syntax highlighting. This regression only > happened as of 7.3.1088, 7.3.1087 and earlier seem to redraw at > regular speed. Please take a look? > > To reproduce: > 1. Recompile VIM and include all patches up to and including 7.3.1088 > 2. Open anything with syntax highlighting enabled, such as :help > 3. Scroll to the bottom, notice the visible lag. Go forward to 7.3.1110, should be better. -- hundred-and-one symptoms of being an internet addict: 84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE /// 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/groups/opt_out.
Re: Patch 7.3.1110
Ron Aaron wrote: > Er, but all the patches up until this last have appeared on the ftp > site. I thought that was the canonical patch place. Recently there was a discussion about git and all its features. It's good to know at least some people just use patches. It's just that sometimes I get distracted and forget to push to the ftp site (until there is a next patch). -- hundred-and-one symptoms of being an internet addict: 85. Choice between paying Compuserve bill and paying for kids education is a no brainer -- although a bit painful for your kids. /// 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/groups/opt_out.
Patch 7.3.1111
¼ÇÓé + !"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + 0123456789 + 0123456789 + 0123456789 + 0123456789 + 0123456789 0123456789 !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + 01234567 + 01234567 + 01234567 + 01234567 + 01234567 01234567 !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~ €‚ ›¦±¼ÇÓé + 0123456789ABCDEFabcdef + 0123456789ABCDEFabcdef + 0123456789ABCDEFabcdef + 0123456789ABCDEFabcdef + 0123456789ABCDEFabcdef 0123456789ABCDEFabcdef !"#$%&'()#+'-./:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + 0123456789ABCDEFGHIXYZ_abcdefghiwxyz + 0123456789ABCDEFGHIXYZ_abcdefghiwxyz + 0123456789ABCDEFGHIXYZ_abcdefghiwxyz + 0123456789ABCDEFGHIXYZ_abcdefghiwxyz + 0123456789ABCDEFGHIXYZ_abcdefghiwxyz 0123456789ABCDEFGHIXYZ_abcdefghiwxyz !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~ €‚ ›¦±¼ÇÓé + ABCDEFGHIXYZ_abcdefghiwxyz + ABCDEFGHIXYZ_abcdefghiwxyz + ABCDEFGHIXYZ_abcdefghiwxyz + ABCDEFGHIXYZ_abcdefghiwxyz + ABCDEFGHIXYZ_abcdefghiwxyz ABCDEFGHIXYZ_abcdefghiwxyz !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~ €‚ ›¦±¼ÇÓé + ABCDEFGHIXYZabcdefghiwxyz + ABCDEFGHIXYZabcdefghiwxyz + ABCDEFGHIXYZabcdefghiwxyz + ABCDEFGHIXYZabcdefghiwxyz + ABCDEFGHIXYZabcdefghiwxyz ABCDEFGHIXYZabcdefghiwxyz !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~ €‚ ›¦±¼ÇÓé + abcdefghiwxyz + abcdefghiwxyz + abcdefghiwxyz + abcdefghiwxyz + abcdefghiwxyz abcdefghiwxyz !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé + ABCDEFGHIXYZ + ABCDEFGHIXYZ + ABCDEFGHIXYZ + ABCDEFGHIXYZ + ABCDEFGHIXYZ ABCDEFGHIXYZ *** ../vim-7.3.1110/src/version.c 2013-06-04 14:23:00.0 +0200 --- src/version.c 2013-06-04 17:42:06.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + , /**/ -- Ed's Radiator Shop: The Best Place in Town to Take a Leak. /// 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/groups/opt_out.
Patch 7.3.1112
Patch 7.3.1112 Problem:New regexp engine: \%V not supported. Solution: Implement \%V. Add tests. Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok *** ../vim-7.3./src/regexp.c2013-06-03 19:41:01.0 +0200 --- src/regexp.c2013-06-04 18:28:12.0 +0200 *** *** 4165,4170 --- 4165,4249 } #endif + #ifdef FEAT_VISUAL + static int reg_match_visual __ARGS((void)); + + /* + * Return TRUE if the current reginput position matches the Visual area. + */ + static int + reg_match_visual() + { + pos_T top, bot; + linenr_Tlnum; + colnr_T col; + win_T *wp = reg_win == NULL ? curwin : reg_win; + int mode; + colnr_T start, end; + colnr_T start2, end2; + colnr_T cols; + + /* Check if the buffer is the current buffer. */ + if (reg_buf != curbuf || VIsual.lnum == 0) + return FALSE; + + if (VIsual_active) + { + if (lt(VIsual, wp->w_cursor)) + { + top = VIsual; + bot = wp->w_cursor; + } + else + { + top = wp->w_cursor; + bot = VIsual; + } + mode = VIsual_mode; + } + else + { + if (lt(curbuf->b_visual.vi_start, curbuf->b_visual.vi_end)) + { + top = curbuf->b_visual.vi_start; + bot = curbuf->b_visual.vi_end; + } + else + { + top = curbuf->b_visual.vi_end; + bot = curbuf->b_visual.vi_start; + } + mode = curbuf->b_visual.vi_mode; + } + lnum = reglnum + reg_firstlnum; + if (lnum < top.lnum || lnum > bot.lnum) + return FALSE; + + if (mode == 'v') + { + col = (colnr_T)(reginput - regline); + if ((lnum == top.lnum && col < top.col) + || (lnum == bot.lnum && col >= bot.col + (*p_sel != 'e'))) + return FALSE; + } + else if (mode == Ctrl_V) + { + getvvcol(wp, &top, &start, NULL, &end); + getvvcol(wp, &bot, &start2, NULL, &end2); + if (start2 < start) + start = start2; + if (end2 > end) + end = end2; + if (top.col == MAXCOL || bot.col == MAXCOL) + end = MAXCOL; + cols = win_linetabsize(wp, regline, (colnr_T)(reginput - regline)); + if (cols < start || cols > end - (*p_sel == 'e')) + return FALSE; + } + return TRUE; + } + #endif + #define ADVANCE_REGINPUT() mb_ptr_adv(reginput) /* *** *** 4347,4426 case RE_VISUAL: #ifdef FEAT_VISUAL ! /* Check if the buffer is the current buffer. and whether the !* position is inside the Visual area. */ ! if (reg_buf != curbuf || VIsual.lnum == 0) ! status = RA_NOMATCH; ! else ! { ! pos_T top, bot; ! linenr_Tlnum; ! colnr_T col; ! win_T *wp = reg_win == NULL ? curwin : reg_win; ! int mode; ! ! if (VIsual_active) ! { ! if (lt(VIsual, wp->w_cursor)) ! { ! top = VIsual; ! bot = wp->w_cursor; ! } ! else ! { ! top = wp->w_cursor; ! bot = VIsual; ! } ! mode = VIsual_mode; ! } ! else ! { ! if (lt(curbuf->b_visual.vi_start, curbuf->b_visual.vi_end)) ! { ! top = curbuf->b_visual.vi_start; ! bot = curbuf->b_visual.vi_end; ! } ! else ! { ! top = curbuf->b_visual.vi_end; ! bot = curbuf->b_visual.vi_start; ! } ! mode = curbuf->b_visual.vi_mode; ! } ! lnum = reglnum + reg_firstlnum; ! col = (colnr_T)(reginput - regline); ! if (lnum < top.lnum || lnum > bot.lnum) ! status = RA_NOMATCH; ! else if (mode == 'v') ! { ! if ((lnum == top.lnum && col < top.col) ! || (lnum == bot.lnum !&& col >= bot.col + (*p_sel != 'e'))) ! status = RA_NOMATCH; ! } ! else if (mode == Ctrl_V) ! { ! colnr_T start, end; ! colnr_T start2, end2; ! colnr_T cols; ! ! getvvcol(wp, &top, &start, NULL, &end); ! getvvcol(wp, &bot, &start2, NULL, &end2); ! if (start2 < start) ! start = start2; ! if (end2 >
Patch 7.3.1113
ak; } } syntax_error = TRUE; EMSGN(_("E867: (NFA) Unknown operator '\\%%%c'"), *** *** 1931,1936 --- 1942,1962 case NFA_BOW: STRCPY(code, "NFA_BOW "); break; case NFA_EOF: STRCPY(code, "NFA_EOF "); break; case NFA_BOF: STRCPY(code, "NFA_BOF "); break; + case NFA_LNUM: STRCPY(code, "NFA_LNUM "); break; + case NFA_LNUM_GT: STRCPY(code, "NFA_LNUM_GT "); break; + case NFA_LNUM_LT: STRCPY(code, "NFA_LNUM_LT "); break; + case NFA_COL: STRCPY(code, "NFA_COL "); break; + case NFA_COL_GT:STRCPY(code, "NFA_COL_GT "); break; + case NFA_COL_LT:STRCPY(code, "NFA_COL_LT "); break; + case NFA_VCOL: STRCPY(code, "NFA_VCOL "); break; + case NFA_VCOL_GT: STRCPY(code, "NFA_VCOL_GT "); break; + case NFA_VCOL_LT: STRCPY(code, "NFA_VCOL_LT "); break; + case NFA_MARK: STRCPY(code, "NFA_MARK "); break; + case NFA_MARK_GT: STRCPY(code, "NFA_MARK_GT "); break; + case NFA_MARK_LT: STRCPY(code, "NFA_MARK_LT "); break; + case NFA_CURSOR:STRCPY(code, "NFA_CURSOR "); break; + case NFA_VISUAL:STRCPY(code, "NFA_VISUAL "); break; + case NFA_STAR: STRCPY(code, "NFA_STAR "); break; case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break; case NFA_QUEST: STRCPY(code, "NFA_QUEST"); break; *** *** 2715,2720 --- 2741,2749 case NFA_COL: case NFA_COL_GT: case NFA_COL_LT: + case NFA_MARK: + case NFA_MARK_GT: + case NFA_MARK_LT: if (nfa_calc_size == TRUE) { nstate += 1; *** *** 2724,2730 s = alloc_state(*p, NULL, NULL); if (s == NULL) goto theend; ! s->val = e1.start->c; PUSH(frag(s, list1(&s->out))); break; --- 2753,2759 s = alloc_state(*p, NULL, NULL); if (s == NULL) goto theend; ! s->val = e1.start->c; /* lnum, col or mark name */ PUSH(frag(s, list1(&s->out))); break; *** *** 4723,4728 --- 4752,4781 t->pim, &listidx); break; + case NFA_MARK: + case NFA_MARK_GT: + case NFA_MARK_LT: + { + pos_T *pos = getmark_buf(reg_buf, t->state->val, FALSE); + + /* Compare the mark position to the match position. */ + result = (pos != NULL/* mark doesn't exist */ + && pos->lnum > 0/* mark isn't set in reg_buf */ + && (pos->lnum == reglnum + reg_firstlnum + ? (pos->col == (colnr_T)(reginput - regline) + ? t->state->c == NFA_MARK + : (pos->col < (colnr_T)(reginput - regline) + ? t->state->c == NFA_MARK_GT + : t->state->c == NFA_MARK_LT)) + : (pos->lnum < reglnum + reg_firstlnum + ? t->state->c == NFA_MARK_GT + : t->state->c == NFA_MARK_LT))); + if (result) + addstate_here(thislist, t->state->out, &t->subs, + t->pim, &listidx); + break; + } + case NFA_CURSOR: result = (reg_win != NULL && (reglnum + reg_firstlnum == reg_win->w_cursor.lnum) *** ../vim-7.3.1112/src/testdir/test64.in 2013-06-04 18:28:45.0 +0200 --- src/testdir/test64.in 2013-06-04 21:20:13.0 +0200 *** *** 466,471 --- 466,478 :/^Visual/+1,/^Visual/+4yank Go p:" :" + :" Check matching marks + /^Marks: + jfSmsfEme:.-4,.+6s/.\%>'s.*\%<'e../here/ + jfSmsj0fEme:.-4,.+6s/.\%>'s\_.*\%<'e../again/ + :/^Marks:/+1,/^Marks:/+3yank + Go p:" + :" :" Check patterns matching cursor position. :func! Postest() new *** *** 534,537 --- 541,549 oooxofor foroxooo oooxofor foroxooo + Marks: + asdfSasdfsadfEasdf + asdfSas + dfsadfEasdf + Results of test64: ***
Patch 7.3.1114
Patch 7.3.1114 (after 7.3.1110) Problem:Can't build without the syntax feature. Solution: Add #ifdefs. (Erik Falor) Files: src/regexp_nfa.c *** ../vim-7.3.1113/src/regexp_nfa.c2013-06-04 21:27:33.0 +0200 --- src/regexp_nfa.c2013-06-04 21:39:30.0 +0200 *** *** 3907,3913 --- 3907,3915 if (c > 0) return 99; if ((c >= NFA_MOPEN && c <= NFA_MOPEN9) + #ifdef FEAT_SYN_HL || (c >= NFA_ZOPEN && c <= NFA_ZOPEN9) + #endif || c == NFA_NOPEN) return failure_chance(state->out, depth + 1); /* something else */ *** *** 4201,4207 --- 4203,4211 * Otherwise first do the one that has the highest chance * of failing. */ if ((cout >= NFA_MCLOSE && cout <= NFA_MCLOSE9) + #ifdef FEAT_SYN_HL || (cout >= NFA_ZCLOSE && cout <= NFA_ZCLOSE9) + #endif || cout == NFA_NCLOSE || t->pim != NULL || (t->state->c != NFA_START_INVISIBLE_BEFORE *** ../vim-7.3.1113/src/version.c 2013-06-04 21:27:33.0 +0200 --- src/version.c 2013-06-04 21:41:41.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1114, /**/ -- >From "know your smileys": y:-) Bad toupee /// 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/groups/opt_out.
Re: Patch 7.3.1110
lcd wrote: > On 4 June 2013, Bram Moolenaar wrote: > > > > I wrote: > > > > > Patch 7.3.1110 > > > Problem:New regexp matching: Using \@= and the like can be slow. > > > Solution: Decide whether to first try matching the zero-wdith part or > > > what > > > follows, whatever is more likely to fail. > > > Files:src/regexp_nfa.c > > > > This should make syntax highlighting a lot faster. E.g. for Vim help > > files. > > > > If you previously set 'regexpengine' to 1, give it a try without that. > > For what it's worth: moving cursor with cursorcolumn and cursorline > set is still substantially slower with regexpengine set to 0. With what syntax? With syntax off there should be no difference. -- hundred-and-one symptoms of being an internet addict: 90. Instead of calling you to dinner, your spouse sends e-mail. /// 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/groups/opt_out.
Re: [patch] Store vimrc and gvimrc in your ~/.vim, ~\vimfiles\ directory
Skeept wrote: > On Monday, April 15, 2013 6:49:57 AM UTC-5, Bram Moolenaar wrote: > > Lech Lorens wrote: > > > > > > > On 13-Apr-2013 Bram Moolenaar wrote: > > > > Thanks. Thus only when ~/.vimrc does not exist then ~/.vim/vimrc will > > > > be used. That should work for places where a new Vim is installed. For > > > > older Vim versions one would have to create a ~/.vimrc file that sources > > > > ~/.vim/vimrc. > > > > > > Do we want to change the priority? I meant not to confuse people if by > > > any chance they have both ~/.vimrc and ~/.vim/vimrc. > > > > In my opinion, when a user sees a ~/.vimrc he expects it to be used and > > would be very surprised when it is skipped. That is both for existing > > Vim users and any generic Unix user. Far fewer people would know about > > the possibility for a ~/.vim/vimrc to exist. > > I don't remember if the patch discussed in this thread made it vim already... > If not is it to late to include for 7.4? It's under the "slightly incompatible changes" list. I'll probably include it, but I wonder if it hurts anyone. -- hundred-and-one symptoms of being an internet addict: 91. It's Saturday afternoon in the middle of May and you are on computer. /// 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/groups/opt_out.
Re: regexp_nfa.c compile error --with-features=small
Erik Falor wrote: > regexp_nfa.c cannot compile because the following macros are undefined > when features =3D small|tiny: > > NFA_ZOPEN > NFA_ZOPEN9 > NFA_ZCLOSE > NFA_ZCLOSE9 > > These macros are protected by #ifdef FEAT_SYN_HL beginning at line 116 > in the same file. > > The functions failure_chance() and nfa_regmatch() make unguarded use > of these symbols. The attached patch applies against 7.3.1112 and > prevents the compile error. Thanks! -- >From "know your smileys": :^[/ mean-smiley-with-cigarette /// 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/groups/opt_out.
Patch 7.3.1115
--- *** ../vim-7.3.1114/src/screen.c2013-05-06 04:21:35.0 +0200 --- src/screen.c2013-06-04 22:04:39.0 +0200 *** *** 2329,2343 if (len > w + 1) len = w + 1; ! if (wp->w_p_nu) ! /* 'number' */ num = (long)lnum; else { /* 'relativenumber', don't use negative numbers */ num = labs((long)get_cursor_rel_lnum(wp, lnum)); ! if (num == 0) { num = lnum; fmt = "%-*ld "; } --- 2329,2345 if (len > w + 1) len = w + 1; ! if (wp->w_p_nu && !wp->w_p_rnu) ! /* 'number' + 'norelativenumber' */ num = (long)lnum; else { /* 'relativenumber', don't use negative numbers */ num = labs((long)get_cursor_rel_lnum(wp, lnum)); ! if (num == 0 && wp->w_p_nu && wp->w_p_rnu) { + /* 'number' + 'relativenumber': cursor line shows absolute +* line number */ num = lnum; fmt = "%-*ld "; } *** *** 3499,3513 long num; char *fmt = "%*ld "; ! if (wp->w_p_nu) ! /* 'number' */ num = (long)lnum; else { /* 'relativenumber', don't use negative numbers */ num = labs((long)get_cursor_rel_lnum(wp, lnum)); ! if (num == 0) { num = lnum; fmt = "%-*ld "; } --- 3501,3516 long num; char *fmt = "%*ld "; ! if (wp->w_p_nu && !wp->w_p_rnu) ! /* 'number' + 'norelativenumber' */ num = (long)lnum; else { /* 'relativenumber', don't use negative numbers */ num = labs((long)get_cursor_rel_lnum(wp, lnum)); ! if (num == 0 && wp->w_p_nu && wp->w_p_rnu) { + /* 'number' + 'relativenumber' */ num = lnum; fmt = "%-*ld "; } *** *** 10260,10266 int n; linenr_T lnum; ! lnum = wp->w_buffer->b_ml.ml_line_count; if (lnum == wp->w_nrwidth_line_count) return wp->w_nrwidth_width; --- 10263,10274 int n; linenr_T lnum; ! if (wp->w_p_rnu && !wp->w_p_nu) ! /* cursor line shows "0" */ ! lnum = wp->w_height; ! else ! /* cursor line shows absolute line number */ ! lnum = wp->w_buffer->b_ml.ml_line_count; if (lnum == wp->w_nrwidth_line_count) return wp->w_nrwidth_width; *** ../vim-7.3.1114/src/testdir/test89.in 2013-04-24 15:47:11.0 +0200 --- src/testdir/test89.in 2013-06-04 21:59:01.0 +0200 *** *** 1,4 --- 1,6 Some tests for setting 'number' and 'relativenumber' + This is not all that useful now that the options are no longer reset when + setting the other. STARTTEST :so small.vim *** ../vim-7.3.1114/src/testdir/test89.ok 2013-03-13 20:42:28.0 +0100 --- src/testdir/test89.ok 2013-06-04 21:58:09.0 +0200 *** *** 1,9 results: ! nonumber relativenumber ! nonumber relativenumber :setlocal must NOT reset the other global value --- 1,9 results: ! number relativenumber ! number relativenumber :setlocal must NOT reset the other global value *** *** 12,22 relativenumber :setglobal MUST reset the other global value ! nonumber ! norelativenumber :set MUST reset the other global value ! nonumber ! norelativenumber --- 12,22 relativenumber :setglobal MUST reset the other global value ! number ! relativenumber :set MUST reset the other global value ! number ! relativenumber *** ../vim-7.3.1114/src/version.c 2013-06-04 21:42:19.0 +0200 --- src/version.c 2013-06-04
Patch 7.3.1116
Patch 7.3.1116 Problem:Can't build without Visual mode. Solution: Add #ifdefs. Files: src/regexp_nfa.c *** ../vim-7.3.1115/src/regexp_nfa.c2013-06-04 21:42:19.0 +0200 --- src/regexp_nfa.c2013-06-05 11:01:40.0 +0200 *** *** 181,187 --- 181,189 NFA_MARK, /* Match mark */ NFA_MARK_GT, /* Match > mark */ NFA_MARK_LT, /* Match < mark */ + #ifdef FEAT_VISUAL NFA_VISUAL, /* Match Visual area */ + #endif NFA_FIRST_NL = NFA_ANY + ADD_NL, NFA_LAST_NL = NFA_NUPPER + ADD_NL, *** *** 963,971 --- 965,975 EMIT(NFA_CURSOR); break; + #ifdef FEAT_VISUAL case 'V': EMIT(NFA_VISUAL); break; + #endif case '[': /* TODO: \%[abc] not supported yet */ *** *** 1955,1961 --- 1959,1967 case NFA_MARK_GT: STRCPY(code, "NFA_MARK_GT "); break; case NFA_MARK_LT: STRCPY(code, "NFA_MARK_LT "); break; case NFA_CURSOR:STRCPY(code, "NFA_CURSOR "); break; + #ifdef FEAT_VISUAL case NFA_VISUAL:STRCPY(code, "NFA_VISUAL "); break; + #endif case NFA_STAR: STRCPY(code, "NFA_STAR "); break; case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break; *** *** 4790,4801 --- 4796,4809 t->pim, &listidx); break; + #ifdef FEAT_VISUAL case NFA_VISUAL: result = reg_match_visual(); if (result) addstate_here(thislist, t->state->out, &t->subs, t->pim, &listidx); break; + #endif default:/* regular character */ { *** ../vim-7.3.1115/src/version.c 2013-06-04 22:13:45.0 +0200 --- src/version.c 2013-06-04 23:42:50.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 1116, /**/ -- >From "know your smileys": ;-0Can't find shift key ,-9Kann Umschalttaste nicht finden /// 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/groups/opt_out.
Patch 7.3.1117
H(frag(s, e1.out)); + break; + } + case NFA_PREV_ATOM_NO_WIDTH: case NFA_PREV_ATOM_NO_WIDTH_NEG: case NFA_PREV_ATOM_JUST_BEFORE: case NFA_PREV_ATOM_JUST_BEFORE_NEG: + { + int neg = (*p == NFA_PREV_ATOM_NO_WIDTH_NEG + || *p == NFA_PREV_ATOM_JUST_BEFORE_NEG); + int before = (*p == NFA_PREV_ATOM_JUST_BEFORE + || *p == NFA_PREV_ATOM_JUST_BEFORE_NEG); + int n; + + if (before) + n = *++p; /* get the count */ + /* The \@= operator: match the preceding atom with zero width. * The \@! operator: no match for the preceding atom. * The \@<= operator: match for the preceding atom. *** *** 2583,2603 s = alloc_state(NFA_START_INVISIBLE, e.start, s1); if (s == NULL) goto theend; ! if (*p == NFA_PREV_ATOM_NO_WIDTH_NEG ! || *p == NFA_PREV_ATOM_JUST_BEFORE_NEG) { s->negated = TRUE; s1->negated = TRUE; } ! if (*p == NFA_PREV_ATOM_JUST_BEFORE ! || *p == NFA_PREV_ATOM_JUST_BEFORE_NEG) { ! s->val = *++p; /* get the count */ ++s->c; /* NFA_START_INVISIBLE -> NFA_START_INVISIBLE_BEFORE */ } PUSH(frag(s, list1(&s1->out))); break; #ifdef FEAT_MBYTE case NFA_COMPOSING: /* char with composing char */ --- 2637,2656 s = alloc_state(NFA_START_INVISIBLE, e.start, s1); if (s == NULL) goto theend; ! if (neg) { s->negated = TRUE; s1->negated = TRUE; } ! if (before) { ! s->val = n; /* store the count */ ++s->c; /* NFA_START_INVISIBLE -> NFA_START_INVISIBLE_BEFORE */ } PUSH(frag(s, list1(&s1->out))); break; + } #ifdef FEAT_MBYTE case NFA_COMPOSING: /* char with composing char */ *** *** 2750,2767 case NFA_MARK: case NFA_MARK_GT: case NFA_MARK_LT: if (nfa_calc_size == TRUE) { nstate += 1; break; } ! e1 = POP(); ! s = alloc_state(*p, NULL, NULL); if (s == NULL) goto theend; ! s->val = e1.start->c; /* lnum, col or mark name */ PUSH(frag(s, list1(&s->out))); break; case NFA_ZSTART: case NFA_ZEND: --- 2803,2823 case NFA_MARK: case NFA_MARK_GT: case NFA_MARK_LT: + { + int n = *++p; /* lnum, col or mark name */ + if (nfa_calc_size == TRUE) { nstate += 1; break; } ! s = alloc_state(p[-1], NULL, NULL); if (s == NULL) goto theend; ! s->val = n; PUSH(frag(s, list1(&s->out))); break; + } case NFA_ZSTART: case NFA_ZEND: *** ../vim-7.3.1116/src/testdir/test64.in 2013-06-04 21:27:33.0 +0200 --- src/testdir/test64.in 2013-06-04 23:45:44.0 +0200 *** *** 352,357 --- 352,370 :call add(tl, [2, '\%u0020', 'yes no', ' ']) :call add(tl, [2, '\%U0020', 'yes no', ' ']) :" + :""""" \%[abc] + :call add(tl, [2, 'foo\%[bar]', 'fobar']) + :call add(tl, [2, 'foo\%[bar]', 'foobar', 'foobar']) + :call add(tl, [2, 'foo\%[bar]', 'fooxx', 'foo']) + :call add(tl, [2, 'foo\%[bar]', 'foobxx', 'foob']) + :call add(tl, [2, 'foo\%[bar]', 'foobaxx', 'fooba']) + :call add(tl, [2, 'foo\%[bar]', 'foobarxx', 'foobar']) + :call add(tl, [2, 'foo\%[bar]x', 'foobxx', 'foobx']) + :call add(tl, [2, 'foo\%[bar]x', 'foobarxx', 'foobarx']) + :call add(tl, [2, '\%[bar]x', 'barxx', 'barx']) + :call add(tl, [2, '\%[bar]x', 'bxx', 'bx']) + :call add(tl, [2, '\%[bar]x', 'xxx', 'x']) + :" :"""" Alternatives, must use first longest match :call add(tl, [2, 'goo\|go', 'google', 'goo']) :call add(tl, [2, '\From "know your smileys": :-)Funny |-)Funny Oriental (-:Funny Australian /// 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/groups/opt_out.