new feature: support for centered cursor (disabled by default)
This commit is contained in:
@@ -235,6 +235,8 @@ template <typename WindowType> void Screen<WindowType>::Scroll(Where where, cons
|
||||
}
|
||||
else
|
||||
w->Scroll(where);
|
||||
if (List *list = Config.centered_cursor ? dynamic_cast<List *>(w) : 0)
|
||||
list->Highlight(list->Choice());
|
||||
}
|
||||
|
||||
template <typename WindowType> void Screen<WindowType>::MouseButtonPressed(MEVENT me)
|
||||
|
||||
@@ -293,6 +293,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
|
||||
conf.header_visibility = true;
|
||||
conf.header_text_scrolling = true;
|
||||
conf.statusbar_visibility = true;
|
||||
conf.centered_cursor = false;
|
||||
conf.autocenter_mode = false;
|
||||
conf.wrapped_search = true;
|
||||
conf.space_selects = false;
|
||||
@@ -756,6 +757,10 @@ void ReadConfiguration(ncmpcpp_config &conf)
|
||||
{
|
||||
conf.autocenter_mode = v == "yes";
|
||||
}
|
||||
else if (cl.find("centered_cursor") != std::string::npos)
|
||||
{
|
||||
conf.centered_cursor = v == "yes";
|
||||
}
|
||||
else if (cl.find("default_find_mode") != std::string::npos)
|
||||
{
|
||||
conf.wrapped_search = v == "wrapped";
|
||||
|
||||
@@ -186,6 +186,7 @@ struct ncmpcpp_config
|
||||
bool header_visibility;
|
||||
bool header_text_scrolling;
|
||||
bool statusbar_visibility;
|
||||
bool centered_cursor;
|
||||
bool autocenter_mode;
|
||||
bool wrapped_search;
|
||||
bool space_selects;
|
||||
|
||||
Reference in New Issue
Block a user