mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-24 16:15:38 +03:00
Fix crash in Context::main_sel_register_value
This commit is contained in:
parent
352228c3b0
commit
b934c8ede5
@ -231,7 +231,7 @@ StringView Context::main_sel_register_value(StringView reg) const
|
||||
{
|
||||
auto strings = RegisterManager::instance()[reg].values(*this);
|
||||
size_t index = m_selections ? (*m_selections).main_index() : 0;
|
||||
if (strings.size() < index)
|
||||
if (strings.size() <= index)
|
||||
index = strings.size() - 1;
|
||||
return strings[index];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user