mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
(button_set_text): update value of WButton::hotpos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
6d31d85f0d
commit
6b90a1468a
@ -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 <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user