[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String escape for total number of windows?

From: Thor Andreassen
Subject: Re: String escape for total number of windows?
Date: Fri, 18 Dec 2009 16:38:04 +0100

On Thu, Dec 10, 2009 at 10:25:11PM -0800, John Magolske wrote:
> Is there a string escape sequence that will display the total number
> of windows (just a single number, not all window numbers and names)?

There does not seem to be.
> For example, if I were in the 7th window and 23 windows were open,
> I'd like to see something like
>   7 / 23 : vim ~/.mutt/temp/mutt-1000-25786-33
> by setting hardstatus to something like
>   hardstatus alwayslastline "%n / %x : %t"
> Of course %x is not an escape for anything, I'm just using it here as
> a placeholder...there doesn't seem to be an escape for total number of
> windows. Might it be possible to achieve this by truncating the output
> of %w or some such thing?

Looking at the code, at least with my eyes, truncation seems difficult
and will probably end up as a hack.

I've attached a patch that copies some of the functionality of the '%w'
handling, and should be applied to the newest source on savannah. It
seems to produce the correct result, although someone more familiar with
the code should check it for any unwanted consequences.



Attachment: number_of_windows.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]