|
@@ -98,6 +98,8 @@ void TextEditor::create_actions()
|
|
},
|
|
},
|
|
this);
|
|
this);
|
|
}
|
|
}
|
|
|
|
+ m_select_all_action = Action::create(
|
|
|
|
+ "Select all", { Mod_Ctrl, Key_A },Gfx::Bitmap::load_from_file("/res/icons/16x16/select-all.png"), [this](auto&) { select_all(); }, this);
|
|
}
|
|
}
|
|
|
|
|
|
void TextEditor::set_text(const StringView& text)
|
|
void TextEditor::set_text(const StringView& text)
|
|
@@ -812,10 +814,6 @@ void TextEditor::keydown_event(KeyEvent& event)
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (event.modifiers() == Mod_Ctrl && event.key() == KeyCode::Key_A) {
|
|
|
|
- select_all();
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
if (event.alt() && event.shift() && event.key() == KeyCode::Key_S) {
|
|
if (event.alt() && event.shift() && event.key() == KeyCode::Key_S) {
|
|
sort_selected_lines();
|
|
sort_selected_lines();
|
|
return;
|
|
return;
|
|
@@ -1277,6 +1275,8 @@ void TextEditor::context_menu_event(ContextMenuEvent& event)
|
|
m_context_menu->add_action(copy_action());
|
|
m_context_menu->add_action(copy_action());
|
|
m_context_menu->add_action(paste_action());
|
|
m_context_menu->add_action(paste_action());
|
|
m_context_menu->add_action(delete_action());
|
|
m_context_menu->add_action(delete_action());
|
|
|
|
+ m_context_menu->add_separator();
|
|
|
|
+ m_context_menu->add_action(select_all_action());
|
|
if (is_multi_line()) {
|
|
if (is_multi_line()) {
|
|
m_context_menu->add_separator();
|
|
m_context_menu->add_separator();
|
|
m_context_menu->add_action(go_to_line_action());
|
|
m_context_menu->add_action(go_to_line_action());
|