doc bug? index() doesn't check for equality in the same way as ==

2008-09-07 Fir de Conversatie Matt Wozniski
Using ==, strings and numbers can compare as equal, and using index() on a list, this is not the case: :echo 2 == 2 Returns 1 :echo index( [ 2 ], 2) Returns -1 The docs just say that index() will Return the lowest index in |List| {list} where the item has a value equal to {expr},

Re: Bug with screen redraw introduced by 7.1.329

2008-09-04 Fir de Conversatie Matt Wozniski
On Thu, Sep 4, 2008 at 4:09 PM, Bram Moolenaar wrote: Tyler Spivey wrote: hello. I have noticed that starting from 7.1.329, using vim in the console with the encoding set to utf8, there is a bug with redrawing characters. The characters show up on the screen fine (at least to my screen

Re: synIDattr() and 'guisp' attribute [with patch]

2008-09-02 Fir de Conversatie Matt Wozniski
On Fri, Aug 15, 2008 at 2:02 AM, Matt Wozniski wrote: synIDattr() currently does not support the ability to read a 'guisp' attribute from a highlight group, even though the underlying C function it exposes does support it. I've attached a patch to update the interface and docs to allow

Re: synIDattr() and 'guisp' attribute [with patch]

2008-09-02 Fir de Conversatie Matt Wozniski
On Tue, Sep 2, 2008 at 6:42 AM, Tony Mechelynck wrote: I'm seeing your message and I don't know the answer. Do you want a similar message from everyone who doesn't know the answer? Naturally not; your response was far more wasteful than my post already, and not just because of wasting twice

Re: [SPAM:XXXXXXXX] sort()'s function reference arg

2008-08-25 Fir de Conversatie Matt Wozniski
On Sun, Aug 24, 2008 at 11:22 AM, Robert Webb wrote: Hi, The help for sort() says the following with respect to the function reference argument: ...The function is invoked with two items as argument and must return zero if they are equal, 1 if the first one sorts after the

Re: Bug with v_K and potentially K command

2008-08-22 Fir de Conversatie Matt Wozniski
On Fri, Aug 22, 2008 at 6:41 PM, Tony Mechelynck wrote: On 22/08/08 21:20, Jan Minář wrote: Thanks. I'll have a good look at it later. One thing I noticed: you don't need to give an error message for running out of memory at this level, it's already done at a lower level in alloc(). There

Re: Bug with v_K and potentially K command

2008-08-21 Fir de Conversatie Matt Wozniski
On Thu, Aug 21, 2008 at 1:56 AM, Ben Schmidt wrote: place your cursor on 'pwnme', and press K. xclock appears. Yeah, this is the kind of exploit where you have to tell the user to do something stupid and them blame Vim that the user is stupid. Yes. Still...that seems to be the current

Re: Bug with v_K and potentially K command

2008-08-21 Fir de Conversatie Matt Wozniski
On Thu, Aug 21, 2008 at 1:05 PM, Tony Mechelynck wrote: On 21/08/08 08:25, Matt Wozniski wrote: [...] In that vein, perhaps using the shell should be an option... but doubtless the best default behavior is to use system(3) for places like :! where shell expansion is good,and execlp

Bug in clipboard handling on X11

2008-08-21 Fir de Conversatie Matt Wozniski
Not sure what's going on here, but I've found a crash that's easy to reproduce. First, open two X11 enabled vim (not gvim) processes. In the first, do: :let @+ = repeat('a', 1024*1024) in order to store 1MB of data to the clipboard. The exact amount is irrelevant, but the larger the size, the

Re: synIDattr() and 'guisp' attribute [with patch]

2008-08-21 Fir de Conversatie Matt Wozniski
On Fri, Aug 15, 2008 at 2:02 AM, Matt Wozniski wrote: synIDattr() currently does not support the ability to read a 'guisp' attribute from a highlight group, even though the underlying C function it exposes does support it. I've attached a patch to update the interface and docs to allow

Re: Bug with v_K and potentially K command

2008-08-20 Fir de Conversatie Matt Wozniski
On Wed, Aug 20, 2008 at 4:33 AM, Tony Mechelynck wrote: On 20/08/08 09:47, Jan Minář wrote: The above will of course not work. The following will: /* We use an obscure glibc function -- check out the man page! */ clockface =(xclock)pwnme (a, b, x + y); /*

Re: Bug with v_K and potentially K command

2008-08-20 Fir de Conversatie Matt Wozniski
On Thu, Aug 21, 2008 at 12:55 AM, Bram Moolenaar [EMAIL PROTECTED] wrote: Matt Wozniski wrote: Jan got the exploit right, but formatted his modeline wrong. Try this document: /* We use an obscure glibc function -- check out the man page! */ clockface = (xclock)pwnme (a, b, x + y

Re: [Bug report] Crash on completion over unix user

2008-06-24 Fir de Conversatie Matt Wozniski
On Tue, Jun 24, 2008 at 2:48 AM, Thibault Taillandier wrote: How to reproduce the bug : - start vim (with an existing file or a new file) - type in this command: :vs ~ap - And press tab for auto-completion. - vim crashes with this message (my vim is in french): Vim: Signal mortel ABRT

Re: regexp: does anyone really need ordered alternation?

2008-03-28 Fir de Conversatie Matt Wozniski
On Thu, Mar 27, 2008 at 2:47 PM, Bram Moolenaar wrote: Xiaozhou Liu wrote: During the development of the new regexp, one thing confuses me a lot: ordered alternation. (e.g. given r.e. 'ab\|abc' and text 'abc', 'ab' matched, not 'abc') I know that 100% compatibility is one of the

Re: Mapping s-space with GTK2 (was write 'set t_Co=256', scroll and keybind problems)

2008-02-25 Fir de Conversatie Matt Wozniski
On Sun, Feb 24, 2008 at 7:13 PM, Tony Mechelynckwrote: Matt Wozniski wrote: If anyone remembers this thread, the OP complained that he could neither get s-space to be recognized independently of space in vim nor in a GTK2 or Gnome2 gvim. I gave him a solution to get it to work

Re: Make directory option a global-local

2008-02-25 Fir de Conversatie Matt Wozniski
On Mon, Feb 25, 2008 at 9:27 AM, Andrew McCarthy wrote: On Mon, Feb 25, 2008 at 07:57:02AM -0500, James Vega wrote: On Mon, Feb 25, 2008 at 12:06:24PM +, Andrew McCarthy wrote: Thoughts? Any better/cleaner ideas? mkdir -p ~/.vim/tmp echo 'set directory=$HOME/.vim/tmp'

Mapping s-space with GTK2 (was write 'set t_Co=256', scroll and keybind problems)

2008-02-25 Fir de Conversatie Matt Wozniski
Sent this to Bram instead of the list accidentally; forwarding. -- Forwarded message -- From: Matt Wozniski [EMAIL PROTECTED] Date: Mon, Feb 25, 2008 at 4:02 PM Subject: Re: Mapping s-space with GTK2 (was write 'set t_Co=256', scroll and keybind problems) To: Bram Moolenaar

Mapping s-space with GTK2 (was write 'set t_Co=256', scroll and keybind problems)

2008-02-24 Fir de Conversatie Matt Wozniski
On Mon, Feb 4, 2008 at 4:55 PM, [EMAIL PROTECTED] wrote: On Jan 12, 1:57 pm, Matt Wozniski wrote: On Jan 12, 2008 12:49 PM, Ben Schmidt wrote: noremap Space PageDown noremap S-Space PageUp However, in Linux, running vim inside the gnome-terminal 2.18.2 (or when

Re: VIM and NTFS streams

2008-02-04 Fir de Conversatie Matt Wozniski
On Feb 4, 2008 9:18 AM, krischik wrote: On the other hand use of extended attributes could solve a problem with 5 lines of code where solving the same problem without could cost you 50. Determine file types, text file line endings and text file encoding come to my mind here. Ask Bram how

Re: VIM and NTFS streams

2008-02-04 Fir de Conversatie Matt Wozniski
On Feb 4, 2008 4:29 PM, krischik wrote: On 4 Feb., 21:10, Matt Wozniski wrote: While this would be nice, it would require support code from every application you have. It may only be 6 lines, but 6 lines * 5000 binaries is much more code than is in vim for line ending detection

Re: Incorrect example for #!

2008-01-23 Fir de Conversatie Matt Wozniski
On Jan 23, 2008 11:15 AM, Erik Falor wrote: On 23/01/2008, Dasn wrote: I don't think #!/usr/bin/env vim -S is workable on all platforms. $ cat test.vim #!/usr/bin/env vim -S echo this is a Vim script quit $ chmod +x test.vim $ ./test.vim env: vim -S: No such file or directory

Re: Bug in syntax/mail.vim

2008-01-10 Fir de Conversatie Matt Wozniski
On Jan 10, 2008 2:39 PM, James Vega [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 08:28:14PM +0100, Tony Mechelynck wrote: The parentheses should have been percent-escaped, i.e., replaced by a percent sign and their hex value (00-FF) as in http://www.vim.org/%28test%29

Re: Patch for Unix filename expansion to try out

2008-01-06 Fir de Conversatie Matt Wozniski
On Jan 6, 2008 9:09 AM, Bram Moolenaar wrote: We haven't been using printf so far, thus this needs to be tested to find any system where it doesn't work. The opengroup isn't always right (I don't think they cover Cygwin). The cygwin developers regularly reference opengroup man pages on the

Re: Patch to allow ctermfg or bg values as #rrggbb

2008-01-03 Fir de Conversatie Matt Wozniski
On Dec 20, 2007 11:44 PM, Matt Wozniski [EMAIL PROTECTED] wrote: ... So, I've reworked the patch to support, in addition to the xterm-compatible palette, Eterm and Konsole's palettes. Which palette is used for the matching is controlled by a new option, 'termpalette' (short name 'tpal

Re: Patch to allow ctermfg or bg values as #rrggbb

2007-12-21 Fir de Conversatie Matt Wozniski
On Dec 21, 2007 5:18 AM, Nico Weber [EMAIL PROTECTED] wrote: 2) There is no algorithm available to programmatically judge the perceived differences between colors that suits our purposes. We do well with CIE L*a*b*, but not better than the stepping algorithm I proposed first, and in

Re: Patch to allow ctermfg or bg values as #rrggbb

2007-12-20 Fir de Conversatie Matt Wozniski
On Nov 12, 2007 5:41 AM, Matt Wozniski [EMAIL PROTECTED] wrote: So, I would certainly welcome some advice on how querying can be done reasonably... Gnome-terminal and Konsole, at least, do not seem to be able to report back their colors... So, I guess one (pseudocode) approach

Re: encrypt/decrypt functions for a session

2007-12-05 Fir de Conversatie Matt Wozniski
On Dec 5, 2007 1:21 AM, thomas wrote: Thank you, Ben! That's exactly what I meant. For this, keeping a variable in a script-local function would suffice -- I personally haven't found a way yet to access a s:var. ... Also, you will most likely have to define functions that decrypt the

Re: encrypt/decrypt functions for a session

2007-12-04 Fir de Conversatie Matt Wozniski
On Dec 3, 2007 4:59 PM, Charles E. Campbell, Jr. wrote: Matt Wozniski wrote: On Dec 3, 2007 2:05 PM, Charles E. Campbell, Jr. wrote: Assuming that I have an encrypt/decrypt function pair, the pid could be used as a single-session p/w that would be transparent to the user. I don't see

Re: encrypt/decrypt functions for a session

2007-12-03 Fir de Conversatie Matt Wozniski
On Dec 3, 2007 2:05 PM, Charles E. Campbell, Jr. wrote: Matt Wozniski wrote: Fixing that to use a script-local variable would definitely be a worthwhile change that should be made ASAP, though it still wouldn't protect you from plaintext passwords being in your core files. Yes, I've done

Re: Opening a folder in VIM running on Linux

2007-11-17 Fir de Conversatie Matt Wozniski
On Nov 17, 2007 6:03 AM, Narayanan A R [EMAIL PROTECTED] wrote: I use to type :e folder path for opening a folder in VIM running on Windows and it used to work. However the same doesn't work any more for Linux. It opens only files. I am using Ubuntu 7.10. This feature is really helpful to

Re: Patch to allow ctermfg or bg values as #rrggbb

2007-11-12 Fir de Conversatie Matt Wozniski
On Nov 12, 2007 4:29 AM, Gautam Iyer [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 02:56:24AM -0500, Matthew Wozniski wrote: Do all the terminals supporting 88 and 256 colors really use the same color values? Well... As far as I can tell, they seem to _default_ to the same

Re: Bug in Vim brace expansion

2007-11-12 Fir de Conversatie Matt Wozniski
On Nov 12, 2007 9:42 AM, Nikolai Weibull [EMAIL PROTECTED] wrote: Either way, there's no way to escape a comma inside braces. :echo glob('/tmp/{a,b\\054c}') That works for shell=/bin/zsh and shell=/bin/tcsh for me, though not for shell=/bin/bash. While I agree that you ought to be able to

Re: Bug in Vim brace expansion

2007-11-12 Fir de Conversatie Matt Wozniski
On Nov 12, 2007 9:56 AM, Vladimir Marek [EMAIL PROTECTED] wrote: Personally I would like to see something like glob_internal() which would do globbing entirely in c without accessing your shell. But I'm not going to write the patch, so I just silently hope :) Or having readdir to be able to

Re: Filename completion relative to current buffer's location, not current working directory

2007-10-29 Fir de Conversatie Matt Wozniski
On 10/29/07, Dominique Pelle [EMAIL PROTECTED] wrote: I have the following line in my .vimrc which does exactly what you're looking for, and I find it very useful: autocmd BufEnter * exe 'cd ' . substitute(expand(%:p:h), , , g) You might prefer this line: au BufEnter * if ft != 'help' |

<    1   2