fix disabled fancy_scrolling with enabled centered_cursor
This commit is contained in:
@@ -225,6 +225,7 @@ template <typename WindowType> void Screen<WindowType>::ReadKey(int &key)
|
|||||||
|
|
||||||
template <typename WindowType> void Screen<WindowType>::Scroll(Where where, const int key[2])
|
template <typename WindowType> void Screen<WindowType>::Scroll(Where where, const int key[2])
|
||||||
{
|
{
|
||||||
|
List *list = Config.centered_cursor ? dynamic_cast<List *>(w) : 0;
|
||||||
if (!Config.fancy_scrolling && key)
|
if (!Config.fancy_scrolling && key)
|
||||||
{
|
{
|
||||||
int in = key[0];
|
int in = key[0];
|
||||||
@@ -233,15 +234,19 @@ template <typename WindowType> void Screen<WindowType>::Scroll(Where where, cons
|
|||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
w->Scroll(where);
|
w->Scroll(where);
|
||||||
|
if (list)
|
||||||
|
list->Highlight(list->Choice());
|
||||||
w->Refresh();
|
w->Refresh();
|
||||||
w->ReadKey(in);
|
w->ReadKey(in);
|
||||||
}
|
}
|
||||||
w->SetTimeout(ncmpcpp_window_timeout);
|
w->SetTimeout(ncmpcpp_window_timeout);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
w->Scroll(where);
|
w->Scroll(where);
|
||||||
if (List *list = Config.centered_cursor ? dynamic_cast<List *>(w) : 0)
|
if (list)
|
||||||
list->Highlight(list->Choice());
|
list->Highlight(list->Choice());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename WindowType> void Screen<WindowType>::MouseButtonPressed(MEVENT me)
|
template <typename WindowType> void Screen<WindowType>::MouseButtonPressed(MEVENT me)
|
||||||
|
|||||||
Reference in New Issue
Block a user