Re: [dev] [dmenu] bugs and senselessness

From: Anselm R Garbe <>
Date: Thu, 1 Apr 2010 21:37:24 +0100

Hi Connor,

On 1 April 2010 20:40, Connor Lane Smith <> wrote:
> The last dmenu revision doesn't make any sense. It goes through a load
> of hassle and complexity dynamically reallocating memory, and then has
> no real effect, because text is a fixed 4096 byte buffer. Items longer
> than 4096 chars are just plain inaccessible.
> There are two options here. Either at the end of readstdin we can
> "text = malloc(max)", and then pass around "max" instead of just using
> "sizeof text" (since pointers don't work in the same way as arrays)...
> which seems ugly to me... Or we can just use a 4096 byte buf in
> readstdin, which makes a lot of sense anyway.
> I've been working on a patch since before the recent commits anyway,
> so I've merged in the ^A and ^E keybindings, but just increased the
> size of the readstdin buf to sizeof text. If we *really* want dynamic
> allocation and to pass around a "max" value etc, I suppose I could
> merge that in instead, but I don't see the necessity: do we honestly
> need to add such complexity in order to support lines longer than
> 4096? Those are pretty epic line lengths for what is essentially a
> menu.
> So the following patch fixes some bugs and oddities separate to the
> whole dynamic alloc issue, as well as just increasing buf to sizeof
> text, basically doing the same job as the previous revision.

I agree. The patch submitted by pancake is quite experimental, though
there is no real point in nibble's original patch I think.

Anyway, I discussed the next steps regarding dmenu today and this is
what I plan todo:

Currently I'm open for dmenu contributions, though very soon (in a
weeks time) I will radically cleanse dmenu to make it very simple
again (as it was), but incorporate a specific set of features into a
new dinput application, mainly the vert menu stuff + ^p handling + the
cursor handling, etc.

With this dmenu will retain it's simplicity and beauty and dinput can
be used for the different purpose of surf. Both apps will be
considerably simpler than current dmenu.

Received on Thu Apr 01 2010 - 20:37:24 UTC

This archive was generated by hypermail 2.2.0 : Thu Apr 01 2010 - 20:48:03 UTC