1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 09:47:35 +00:00

LibGUI+TextEditor: Highlight the entire current line

And fix Line Highlighting's duplicate alt-menu shortcut.

Previously only text on the cursor's line was highlighted. This makes
discerning cursor focus on empty lines easier.
This commit is contained in:
thankyouverycool 2022-02-02 19:28:58 -05:00 committed by Linus Groh
parent b2df863b55
commit f35a6c13ab
2 changed files with 11 additions and 4 deletions

View file

@ -519,12 +519,12 @@ void MainWidget::initialize_menubar(GUI::Window& window)
view_menu.add_action(*m_visualize_trailing_whitespace_action);
view_menu.add_action(*m_visualize_leading_whitespace_action);
m_cursor_line_highlighting_action = GUI::Action::create_checkable("Line High&lighting", [&](auto&) {
m_cursor_line_highlighting_action = GUI::Action::create_checkable("L&ine Highlighting", [&](auto&) {
m_editor->set_cursor_line_highlighting(m_cursor_line_highlighting_action->is_checked());
});
m_cursor_line_highlighting_action->set_checked(true);
m_cursor_line_highlighting_action->set_status_tip("Highlight text on the cursor's line");
m_cursor_line_highlighting_action->set_status_tip("Highlight the current line");
view_menu.add_action(*m_cursor_line_highlighting_action);