diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2007-10-02 18:01:46 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2007-10-02 18:01:46 +0000 |
commit | 6a4b62a3ec78b9061d406ca5e2952e450b4f9b9f (patch) | |
tree | a44ebba7fe613cbc690daf64d01778f921c4005e /app/cwm/search.c | |
parent | 319703d525cbe86304cfceaa4c4e30dce0d240c0 (diff) |
When cycling, only the end of the window names will be printed if the
name is too long. so show the beginning instead.
from Pierre Riteau <pierre.riteau at free.fr>
"looks correct" matthieu@
Diffstat (limited to 'app/cwm/search.c')
-rw-r--r-- | app/cwm/search.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/cwm/search.c b/app/cwm/search.c index 075c1d245..5a99a2e51 100644 --- a/app/cwm/search.c +++ b/app/cwm/search.c @@ -4,7 +4,7 @@ * Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org> * All rights reserved. * - * $Id: search.c,v 1.3 2007/06/26 19:34:26 niallo Exp $ + * $Id: search.c,v 1.4 2007/10/02 18:01:45 jasper Exp $ */ #include "headers.h" @@ -239,6 +239,11 @@ search_start(struct menu_q *menuq, } if (y + dy >= ymax) { y = ymax - dy; + /* If the menu is too high, never hide the + * top of the menu. + */ + if (y < 0) + y = 0; warp = 1; } |