1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 14:08:10 +00:00

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

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();