aboutsummaryrefslogtreecommitdiff
path: root/menu/m_cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'menu/m_cursor.c')
-rw-r--r--menu/m_cursor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/menu/m_cursor.c b/menu/m_cursor.c
index 8cf15ce51335..b9b301d3eb90 100644
--- a/menu/m_cursor.c
+++ b/menu/m_cursor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2009,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_cursor.c,v 1.25 2020/12/12 00:38:02 tom Exp $")
+MODULE_ID("$Id: m_cursor.c,v 1.26 2021/03/27 23:46:29 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -83,7 +83,6 @@ _nc_menu_cursor_pos(const MENU *menu, const ITEM *item, int *pY, int *pX)
MENU_EXPORT(int)
pos_menu_cursor(const MENU *menu)
{
- WINDOW *win, *sub;
int x = 0, y = 0;
int err = _nc_menu_cursor_pos(menu, (ITEM *)0, &y, &x);
@@ -91,8 +90,9 @@ pos_menu_cursor(const MENU *menu)
if (E_OK == err)
{
- win = Get_Menu_UserWin(menu);
- sub = menu->usersub ? menu->usersub : win;
+ WINDOW *win = Get_Menu_UserWin(menu);
+ WINDOW *sub = menu->usersub ? menu->usersub : win;
+
assert(win && sub);
if ((menu->opt & O_SHOWMATCH) && (menu->pindex > 0))