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

LibGUI: Single-line GUI::TextEditor should not have "go to line" action

This commit is contained in:
Andreas Kling 2020-02-10 19:39:30 +01:00
parent 580a94bc44
commit 7323d085dd

View file

@ -86,6 +86,7 @@ void TextEditor::create_actions()
m_copy_action = CommonActions::make_copy_action([&](auto&) { copy(); }, this);
m_paste_action = CommonActions::make_paste_action([&](auto&) { paste(); }, this);
m_delete_action = CommonActions::make_delete_action([&](auto&) { do_delete(); }, this);
if (is_multi_line()) {
m_go_to_line_action = Action::create(
"Go to line...", { Mod_Ctrl, Key_L }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png"), [this](auto&) {
auto input_box = InputBox::construct("Line:", "Go to line", window());
@ -99,6 +100,7 @@ void TextEditor::create_actions()
},
this);
}
}
void TextEditor::set_text(const StringView& text)
{