[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] when is $term-cols initialized?
From: |
Thomas Dickey |
Subject: |
Re: [vile] when is $term-cols initialized? |
Date: |
Fri, 16 Mar 2012 21:24:15 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Mar 16, 2012 at 07:05:47PM -0400, address@hidden wrote:
> On Fri, Mar 16, 2012 at 06:21:27PM -0400, Thomas Dickey wrote:
> > On Fri, Mar 16, 2012 at 12:01:47PM -0400, address@hidden wrote:
> > > I'm using this code in my .vilerc:
> > >
> > > ~if &geq $term-cols 80
> > > set number
> > > ~endif
> > >
> > > This does not work when vile first starts up but if I execute it via a
> > > procedure after startup it works fine.
> >
> > that's odd. Reading the code (in main.c) I see that it's opening the
> > terminal (which sets that variable) before running the .vilerc, so
> > it should be set in your script. I tested my assumption with both
> > the terminfo and X versions (win32 isn't convenient at the moment),
> > and both numbered the file.
> >
> > What am I overlooking?
> >
> > --
> > Thomas E. Dickey <address@hidden>
> > http://invisible-island.net
> > ftp://invisible-island.net
>
> You're not overlooking anything. I tested on a different system and it
> worked, when I went back and looked at the original system I see that I
> had a type-o on my first test.
>
> ~if &geg $term-cols 80
>
> geg vs geq
>
> It didn't kick out an error message, it seems the entire condition was
> deemed false. I didn't expect that as I've had vile stop and provide
> error messages when failing to parse .vilerc in the past.
I see. I had made a short .vilerc from the example, and run
vile -D @foo.rc
to see what the trace showed (looked normal). The typo doesn't show up
(which is probably something I should improve, at least to show an
error in the evaluation).
Also it's immediately visible with syntax highlighting turned on ;-)
> Sorry to waste your time on that one :(
no, it's not a waste. In the last patch I had a to-do which I didn't
explore enough (how to report cases where the symbol lookup is ambiguous).
I'm adding these details to my to-do list.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature