Patch: disallow encoding in modeline.
Attached patch disallows 'encoding' in a modeline but not in secure mode. Perharps some others options could use this flag. -- Patrick Texier --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~--- enc.patch Description: 'encoding' patch
Re: Patch: disallow encoding in modeline.
On Tue, Dec 9, 2008 at 3:40 AM, Patrick Texier wrote: Attached patch disallows 'encoding' in a modeline but not in secure mode. Looks like a good idea to me, especially since the vim help explicitly says that 'encoding' should either be set in ~/.vimrc or not at all... In fact, I think it shouldn't be usable in a modeline even if not in secure mode... ~Matt --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Patch 7.2.066
Patch 7.2.066 Problem:It's not easy to see whether 'encoding' is a multi-byte encoding. Solution: Add has('multi_byte_encoding'). Files: runtime/doc/eval.txt, src/eval.c *** ../vim-7.2.065/runtime/doc/eval.txt Fri Nov 28 11:15:10 2008 --- runtime/doc/eval.txtTue Dec 9 10:55:59 2008 *** *** 5841,5847 mouse_pterm Compiled with support for qnx pterm mouse. mouse_sysmouseCompiled with support for sysmouse (*BSD console mouse) mouse_xterm Compiled with support for xterm mouse. ! multi_byteCompiled with support for editing Korean et al. multi_byte_imeCompiled with support for IME input method. multi_langCompiled with support for multiple languages. mzscheme Compiled with MzScheme interface |mzscheme|. --- 5852,5859 mouse_pterm Compiled with support for qnx pterm mouse. mouse_sysmouseCompiled with support for sysmouse (*BSD console mouse) mouse_xterm Compiled with support for xterm mouse. ! multi_byteCompiled with support for 'encoding' ! multi_byte_encoding 'encoding' is set to a multi-byte encoding. multi_byte_imeCompiled with support for IME input method. multi_langCompiled with support for multiple languages. mzscheme Compiled with MzScheme interface |mzscheme|. *** ../vim-7.2.065/src/eval.c Wed Dec 3 09:51:19 2008 --- src/eval.c Wed Dec 3 14:29:09 2008 *** *** 11842,11847 --- 11842,11851 n = has_patch(atoi((char *)name + 5)); else if (STRICMP(name, vim_starting) == 0) n = (starting != 0); + #ifdef FEAT_MBYTE + else if (STRICMP(name, multi_byte_encoding) == 0) + n = has_mbyte; + #endif #if defined(FEAT_BEVAL) defined(FEAT_GUI_W32) else if (STRICMP(name, balloon_multiline) == 0) n = multiline_balloon_available(); *** ../vim-7.2.065/src/version.cWed Dec 3 18:50:09 2008 --- src/version.c Tue Dec 9 10:48:49 2008 *** *** 678,679 --- 678,681 { /* Add new patch number below this line */ + /**/ + 66, /**/ -- ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery, my friend and I will ... we will say Ni! CRONE: Do your worst! Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Patch: disallow encoding in modeline.
On Tue, 9 Dec 2008 04:31:08 -0500, Matt Wozniski wrote: On Tue, Dec 9, 2008 at 3:40 AM, Patrick Texier wrote: Attached patch disallows 'encoding' in a modeline but not in secure mode. Looks like a good idea to me, especially since the vim help explicitly says that 'encoding' should either be set in ~/.vimrc or not at all... In fact, I think it shouldn't be usable in a modeline even if not in secure mode... No, you can never set encoding in a modeline but, if you're in secure mode you can set encoding using ex command-line. In Vim 7.2.65, if you block an option, you block it for modelines and secure mode ex command-line. -- Patrick Texier --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Patch 7.2.068
Patch 7.2.068 Problem:Emacs tags file lines can be too long, resulting in an error message. (James Vega) Solution: Ignore lines with errors if they are too long. Files: src/tag.c *** ../vim-7.2.067/src/tag.cFri Jul 18 11:26:12 2008 --- src/tag.c Sat Dec 6 13:54:33 2008 *** *** 2725,2731 --- 2725,2748 */ p_7f = vim_strchr(lbuf, 0x7f); if (p_7f == NULL) + { + etag_fail: + if (vim_strchr(lbuf, '\n') == NULL) + { + /* Truncated line. Ignore it. */ + if (p_verbose = 5) + { + verbose_enter(); + MSG(_(Ignoring long line in tags file)); + verbose_leave(); + } + tagp-command = lbuf; + tagp-tagname = lbuf; + tagp-tagname_end = lbuf; + return OK; + } return FAIL; + } /* Find ^A. If not found the line number is after the 0x7f */ p = vim_strchr(p_7f, Ctrl_A); *** *** 2735,2741 ++p; if (!VIM_ISDIGIT(*p)) /* check for start of line number */ ! return FAIL; tagp-command = p; --- 2752,2758 ++p; if (!VIM_ISDIGIT(*p)) /* check for start of line number */ ! goto etag_fail; tagp-command = p; *** *** 2749,2755 /* find end of tagname */ for (p = p_7f - 1; !vim_iswordc(*p); --p) if (p == lbuf) ! return FAIL; tagp-tagname_end = p + 1; while (p = lbuf vim_iswordc(*p)) --p; --- 2766,2772 /* find end of tagname */ for (p = p_7f - 1; !vim_iswordc(*p); --p) if (p == lbuf) ! goto etag_fail; tagp-tagname_end = p + 1; while (p = lbuf vim_iswordc(*p)) --p; *** ../vim-7.2.067/src/version.cTue Dec 9 11:17:23 2008 --- src/version.c Tue Dec 9 12:05:41 2008 *** *** 678,679 --- 678,681 { /* Add new patch number below this line */ + /**/ + 68, /**/ -- Q: What do you call a fish without an eye? A: fsh! Q: What do you call a deer with no eyes? A: no eye deer. Q: What do you call a deer with no eyes and no legs? A: still no eye deer. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Build failure for vim_extended with Vim 7.2.065
Birgi Tamersoy, 08.12.2008: Hello Everybody, I fixed this problem with a simple patch. I also had to add something to the Makefile. I decided to separate the Vim source tree patches related to CodeCheck from the direct code_check.c patches. That is why I am attaching two files. Please let me know if this is not a good idea, or there is another common way of doing it. I will fix it accordingly. I've applied the first patch. Markus --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Trial patch for variable tabstops
Richard Hartmann, 08.12.2008: On Mon, Dec 8, 2008 at 08:23, Markus Heidelberg [EMAIL PROTECTED] wrote: I just tried it again and it seems I had misunderstood some things. The tabstops have a fixed position. If a word is longer than the space for the current tabstop, then this tabstop will be ignored and the next will be taken. So if no new version is available at the moment, I can already include it. If it's not too much work and if Matthew OKs the basic workability, I would be willing to trial the existing patch in my normal build. Applied and online. Now it's time to go to work :) Markus --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
(Newbie): Fetching Files From a URL - custom toolbar ? Possible?
Hello, I familiar with vim as a user but not as a developer , so wanted some quick 'is this possible?' advice please ! I have an existing web-app which takes URLs like this: http://myserver/servletdoc=mydoc.txt?page=n Which fetches a 'page' (200 lines in fact) of the given text file. What I would like to do: Create a couple of toolbar buttons for 'gvim' which simply let me inc/ dec that page number and re-fetch from the URL. Is this is do-able ? I notice I can already just load the URL with File|Open - but I obviously need to tag on the extra portion of the URL. Thanks very much in advance, John --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Trial patch for variable tabstops
On Tue, Dec 9, 2008 at 20:03, Matthew Winn [EMAIL PROTECTED] wrote: I did try that but it's trickier than it sounds. 'vts' allocates memory for a parsed copy of the tabstops, and keeping track of that memory when setting ts was excessively complicated so I opted for a simpler ignore ts if vts is set strategy instead. I'll take another look at it because I'm not happy with the counterintuitive way in which 'ts' suddenly ceases to have any effect when 'vts' is set and I'd rather the two options cooperated. Don't you deallocate the memory when vts is unset? In that case, just run the same code to deallocate when ts is being set. Richard --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Trial patch for variable tabstops
On Tue, Dec 9, 2008 at 12:35, Markus Heidelberg [EMAIL PROTECTED] wrote: Applied and online. Now it's time to go to work :) Awesome. I am using it already and I love it! Matthew: Is it possible to mark anything that does not fit into the existing vts scheme (i.e. anything which forces you to shift the tabs) as ERROR so it's highlighted? Is there a better way to give a visual hint when this is happening? Also, would a scheme like set vts=auto[/n[/m]] make sense? auto would obviously auto-space the tabs, while the n defines the min spacing after the longest segment and m sets the maximum length of a cell (a cell being text + tabspace). Of course, this should be possible, as well: set vts=10,5,auto The reason I am not choosing a comma, but something else is that this should _also_ be possible :p set vts=10,auto/5,7,auto,10,auto Also, I want a pony. Richard --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Patch to unify the help files a bit
Or you just discard the patch in case you like it the way it is :) lol. I prefer the latter. The first one has 2 negatives in a row which is a little more confusing. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Vim complexity bug with joining lots of lines
The J command seems to have a complexity bug when given a large numeric argument, eg 10J eg: % yes | head -10 vimtest % time vim vimtest Joined all lines using 9J 17.2u 0.0s 2:29.74 11.5% 0+0k 0+10232io 0pf+0w % yes | head -20 vimtest % time vim vimtest Joined all lines using 19J 68.8u 0.4s 1:41.22 68.3% 0+0k 0+39648io 0pf+0w ie, doubling the number of lines increased the runtime by a factor of 4 exactly - seems like there is a O(N^2) component to the algorithm. I've checked out a copy under SVN, found the O(N^2) code and hacked up a possible fix, but haven't been able to test it because I have some shared library problem - I can create vim7/src/vim but when I run it (even the original version) I get: ld.so.1: vim: fatal: libintl.so.3: open failed: No such file or directory Killed We have /local/solaris86/lib/libintl.so.3 but in /usr/lib there is no .3 version. We used to have good sysadmin support, but no longer... Do you suggest I a) Keep stuffing around here on my own (I could copy everything to my laptop running Ubuntu I guess). Any suggestions welcome... b) Post the (untested) code here (there isn't much and it needs some cleaning up and checking by someone more familiar with Vim anyway). lee --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Vim complexity bug with joining lots of lines
Lee Naish wrote: The J command seems to have a complexity bug when given a large numeric argument, eg 10J eg: % yes | head -10 vimtest % time vim vimtest Joined all lines using 9J 17.2u 0.0s 2:29.74 11.5% 0+0k 0+10232io 0pf+0w % yes | head -20 vimtest % time vim vimtest Joined all lines using 19J 68.8u 0.4s 1:41.22 68.3% 0+0k 0+39648io 0pf+0w ie, doubling the number of lines increased the runtime by a factor of 4 exactly - seems like there is a O(N^2) component to the algorithm. Confirmed with vim-7.2.65 on Linux. Using the following script... $ for s in 1 2 4 6 8 10 12 14 16 do yes | head -$s /tmp/yes.tmp echo === joining $s lines... time vim -u NONE -c '%join|q!' /tmp/yes.tmp done ... I get the following timing for joining lines: #lines real time (sec) 1 0.417 2 1.355 4 4.686 6 10.391 8 18.110 10 28.377 12 40.394 14 54.943 16 71.499 Clearly timing does not increase linearly with the number of lines as one would expect. I've checked out a copy under SVN, found the O(N^2) code and hacked up a possible fix, but haven't been able to test it because I have some shared library problem - I can create vim7/src/vim but when I run it (even the original version) I get: ld.so.1: vim: fatal: libintl.so.3: open failed: No such file or directory Killed We have /local/solaris86/lib/libintl.so.3 but in /usr/lib there is no .3 version. We used to have good sysadmin support, but no longer... Do you suggest I a) Keep stuffing around here on my own (I could copy everything to my laptop running Ubuntu I guess). Any suggestions welcome... b) Post the (untested) code here (there isn't much and it needs some cleaning up and checking by someone more familiar with Vim anyway). lee I let you decide :-) Building vim on Ubuntu is simple: # Install the required packages to be able to build vim $ sudo apt-get build-dep vim-full # download the sources $ cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/vim checkout vim7 # then build $ cd vim7 $ ./configure --with-features=huge $ make $ sudo make install -- Dominique --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---