fix: pass action by reference

This commit is contained in:
NBonaparte 2017-09-06 15:18:56 -07:00
parent 014a9f4c31
commit 1886cf97a8

View File

@ -604,7 +604,7 @@ void bar::handle(const evt::motion_notify& evt) {
m_motion_pos = evt->event_x; m_motion_pos = evt->event_x;
// scroll cursor is less important than click cursor, so we shouldn't return until we are sure there is no click action // scroll cursor is less important than click cursor, so we shouldn't return until we are sure there is no click action
bool found_scroll = false; bool found_scroll = false;
const auto find_click_area = [&](action action) { const auto find_click_area = [&](const action& action) {
if (!m_opts.cursor_click.empty() && if (!m_opts.cursor_click.empty() &&
(action.button == mousebtn::LEFT || action.button == mousebtn::MIDDLE || action.button == mousebtn::RIGHT)) { (action.button == mousebtn::LEFT || action.button == mousebtn::MIDDLE || action.button == mousebtn::RIGHT)) {
if (!string_util::compare(m_opts.cursor, m_opts.cursor_click)) { if (!string_util::compare(m_opts.cursor, m_opts.cursor_click)) {