X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_item_top.c;h=6518d545028b6df5768188932dfbbca91af2c55b;hp=ee0d17b43dd55c16fca16d918dde8a3ea6f45d27;hb=b661daf1160a873609d70843999cd46eff25d1f0;hpb=6830dca51a4e50d41e7bd114bdbaa857b42a46f4 diff --git a/menu/m_item_top.c b/menu/m_item_top.c index ee0d17b4..6518d545 100644 --- a/menu/m_item_top.c +++ b/menu/m_item_top.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_top.c,v 1.14 2020/12/12 00:38:08 tom Exp $") +MODULE_ID("$Id: m_item_top.c,v 1.15 2021/03/27 23:46:29 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -53,8 +53,6 @@ MODULE_ID("$Id: m_item_top.c,v 1.14 2020/12/12 00:38:08 tom Exp $") MENU_EXPORT(int) set_top_row(MENU *menu, int row) { - ITEM *item; - T((T_CALLED("set_top_row(%p,%d)"), (void *)menu, row)); if (menu) @@ -72,6 +70,8 @@ set_top_row(MENU *menu, int row) if (row != menu->toprow) { + ITEM *item; + if (menu->status & _LINK_NEEDED) _nc_Link_Items(menu);