LibGUI: Focus the actively resizing end of GlyphMapWidget selections

This commit is contained in:
thankyouverycool 2022-12-17 15:17:59 -05:00 committed by Andreas Kling
parent 673afffd5a
commit d973d43b13
Notes: sideshowbarker 2024-07-18 03:35:30 +09:00

View file

@ -276,6 +276,12 @@ void GlyphMapWidget::keydown_event(KeyEvent& event)
m_selection.set_start(m_active_glyph);
}
if (event.shift() && event.is_arrow_key()) {
auto resizing_end = m_selection.start() + m_selection.size() - (m_selection.size() > 0 ? 1 : 0);
set_active_glyph(resizing_end, ShouldResetSelection::No);
scroll_to_glyph(resizing_end);
}
int first_glyph = m_active_range.first;
int last_glyph = m_active_range.last;
auto selection = m_selection.normalized();