Re: [dev] [dmenu] Potential bug in dmenu Ctrl+Enter handling

From: Eric Pruitt <eric.pruitt_AT_gmail.com>
Date: Sun, 12 Apr 2015 11:39:20 -0700

On Sun, Apr 12, 2015 at 06:32:13PM +0000, noname_AT_inventati.org wrote:
> The code that actually prints something is
> puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);

Yeah, I saw that line, but the conditional I mentioned determines
whether or not the program actually terminates. The way it's written, it
reads like "IF NOT (Control Is Pressed) THEN Exit," so I expect it to
_not_ exit when I have Control pressed, but that isn't what happens.

> If you hold Shift, it prints the text you have typed ('text'), not the
> selection.

That's irrelevant to this issue.

> If you hold Ctrl, it does not terminate.

Correct, but if you press Ctrl and Enter, it doesn't print any text at
all. Looking at the code, I think it should at least still print the
text, but it doesn't, and that is what I think is a bug.

Eric
Received on Sun Apr 12 2015 - 20:39:20 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 12 2015 - 20:48:09 CEST