From a951f21c598dd2b8939df92db1b471dfd28762e2 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Thu, 27 Sep 2001 21:07:39 +0000 Subject: [PATCH] - nano.c: do_mouse() - Change k based on currslen to allow the new widths in bottombars() git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@793 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ nano.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3c2056d2..52ad9d4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,8 @@ CVS code - lines aren't lined up since the menu width changed though, this breakage depends on whether the new widths will be kept or not (FEEDBACK!!) + - Change k based on currslen to allow the new widths in + bottombars(). do_wrap() - Fixes for Pico incompatibility in cases 2b and 2c. (David Lawrence Ramsey). diff --git a/nano.c b/nano.c index 6fae56e2..fa6f9b8a 100644 --- a/nano.c +++ b/nano.c @@ -1771,7 +1771,13 @@ void do_mouse(void) update_cursor(); edit_refresh(); } else if (wenclose(bottomwin, mevent.y, mevent.x) && !ISSET(NO_HELP)) { - int k = COLS / 6, val = 0; + + int k, val = 0; + + if (currslen < 2) + k = COLS / 6; + else + k = COLS / ((currslen + (currslen %2)) / 2); /* Determine what shortcut list was clicked */ mevent.y -= (editwinrows + 3); -- 2.39.5