parent
cd215ccee9
commit
6d78b06405
|
@ -968,7 +968,8 @@ private:
|
||||||
{
|
{
|
||||||
display();
|
display();
|
||||||
m_line_changed = false;
|
m_line_changed = false;
|
||||||
m_callback(m_line_editor.line(), PromptEvent::Change, context());
|
m_callback((m_flags & PromptFlags::InactiveInitString) ? StringView{} : m_line_editor.line(),
|
||||||
|
PromptEvent::Change, context());
|
||||||
|
|
||||||
if (not (context().flags() & Context::Flags::Transient))
|
if (not (context().flags() & Context::Flags::Transient))
|
||||||
m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context()));
|
m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context()));
|
||||||
|
|
|
@ -718,6 +718,7 @@ void regex_prompt(Context& context, String prompt, String default_regex, T func)
|
||||||
if (event == PromptEvent::Validate)
|
if (event == PromptEvent::Validate)
|
||||||
context.push_jump();
|
context.push_jump();
|
||||||
|
|
||||||
|
if (not str.empty() or event == PromptEvent::Validate)
|
||||||
func(str.empty() ? Regex{default_regex} : Regex{str}, event, context);
|
func(str.empty() ? Regex{default_regex} : Regex{str}, event, context);
|
||||||
}
|
}
|
||||||
catch (regex_error& err)
|
catch (regex_error& err)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user