mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-11 12:44:59 +03:00
JsonUi: try to handle all available requests, on input event, not just the first one
This commit is contained in:
parent
911a32a992
commit
9124851029
@ -425,7 +425,7 @@ void JsonUI::parse_requests(EventMode mode)
|
||||
m_requests += StringView{buf, buf + size};
|
||||
}
|
||||
|
||||
if (not m_requests.empty())
|
||||
while (not m_requests.empty())
|
||||
{
|
||||
const char* pos = nullptr;
|
||||
try
|
||||
@ -442,8 +442,10 @@ void JsonUI::parse_requests(EventMode mode)
|
||||
// try to salvage request by dropping its first line
|
||||
pos = std::min(m_requests.end(), find(m_requests, '\n')+1);
|
||||
}
|
||||
if (pos)
|
||||
m_requests = String{pos, m_requests.end()};
|
||||
if (not pos)
|
||||
break; // unterminated request ?
|
||||
|
||||
m_requests = String{pos, m_requests.end()};
|
||||
}
|
||||
|
||||
while (m_input_callback and not m_pending_keys.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user