summaryrefslogtreecommitdiff
path: root/Userland/Applications/TextEditor/TextEditorWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/TextEditor/TextEditorWidget.cpp')
-rw-r--r--Userland/Applications/TextEditor/TextEditorWidget.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/Userland/Applications/TextEditor/TextEditorWidget.cpp b/Userland/Applications/TextEditor/TextEditorWidget.cpp
index 1bd7ac19aa..9d31b106f8 100644
--- a/Userland/Applications/TextEditor/TextEditorWidget.cpp
+++ b/Userland/Applications/TextEditor/TextEditorWidget.cpp
@@ -39,13 +39,11 @@
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h>
#include <LibGUI/CppSyntaxHighlighter.h>
-#include <LibGUI/EditingEngine.h>
#include <LibGUI/FilePicker.h>
#include <LibGUI/FontPicker.h>
#include <LibGUI/GMLSyntaxHighlighter.h>
#include <LibGUI/INISyntaxHighlighter.h>
#include <LibGUI/JSSyntaxHighlighter.h>
-#include <LibGUI/Label.h>
#include <LibGUI/Menu.h>
#include <LibGUI/MenuBar.h>
#include <LibGUI/MessageBox.h>
@@ -59,7 +57,6 @@
#include <LibGUI/ToolBarContainer.h>
#include <LibGUI/VimEditingEngine.h>
#include <LibGfx/Font.h>
-#include <LibGfx/FontDatabase.h>
#include <LibMarkdown/Document.h>
#include <LibWeb/OutOfProcessWebView.h>
#include <string.h>
@@ -304,21 +301,6 @@ TextEditorWidget::TextEditorWidget()
m_statusbar = *find_descendant_of_type_named<GUI::StatusBar>("statusbar");
- m_statusbar->label(m_vim_mode_statusbar_index)->set_visible(m_editor->editing_engine()->type() == GUI::EditingEngineType::Vim);
- m_statusbar->label(m_vim_mode_statusbar_index)->set_font(Gfx::FontDatabase::default_bold_font());
-
- m_statusbar->label(m_vim_previous_keys_statusbar_index)->set_visible(m_editor->editing_engine()->type() == GUI::EditingEngineType::Vim);
-
- m_editor->on_vim_statusbar_messages_changed = [this] {
- m_statusbar->set_text(m_vim_mode_statusbar_index, m_editor->vim_mode_statusbar_message());
- m_statusbar->set_text(m_vim_previous_keys_statusbar_index, m_editor->vim_previous_keys_statusbar_message());
- };
-
- m_editor->on_editing_engine_changed = [this]() {
- m_statusbar->label(m_vim_mode_statusbar_index)->set_visible(m_editor->editing_engine()->type() == GUI::EditingEngineType::Vim);
- m_statusbar->label(m_vim_previous_keys_statusbar_index)->set_visible(m_editor->editing_engine()->type() == GUI::EditingEngineType::Vim);
- };
-
m_editor->on_cursor_change = [this] { update_statusbar_cursor_position(); };
m_new_action = GUI::Action::create("New", { Mod_Ctrl, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [this](const GUI::Action&) {
@@ -684,5 +666,5 @@ void TextEditorWidget::update_statusbar_cursor_position()
{
StringBuilder builder;
builder.appendff("Line: {}, Column: {}", m_editor->cursor().line() + 1, m_editor->cursor().column());
- m_statusbar->set_text(m_cursor_position_statusbar_index, builder.to_string());
+ m_statusbar->set_text(builder.to_string());
}