diff --git a/lib/widget/button.c b/lib/widget/button.c index 50d31bd5b..10d0955ff 100644 --- a/lib/widget/button.c +++ b/lib/widget/button.c @@ -2,7 +2,7 @@ Widgets for the Midnight Commander Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2009, 2010, 2011 + 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 The Free Software Foundation, Inc. Authors: @@ -11,7 +11,7 @@ Jakub Jelinek, 1995 Andrej Borsenkow, 1996 Norbert Warmuth, 1997 - Andrew Borodin , 2009, 2010 + Andrew Borodin , 2009, 2010, 2013 This file is part of the Midnight Commander. @@ -240,6 +240,7 @@ button_set_text (WButton * b, const char *text) release_hotkey (b->text); b->text = parse_hotkey (text); + b->hotpos = (b->text.hotkey != NULL) ? str_term_width1 (b->text.start) : -1; w->cols = button_get_len (b); widget_redraw (w); }