From 44a46aabeb7dac299390a7aef3d923748a877028 Mon Sep 17 00:00:00 2001 From: ronak69 Date: Fri, 4 Aug 2023 16:31:43 +0000 Subject: [PATCH] LibLine: Refresh the line after case-change operations Previously, case-change operations did not produce visible results. As of now, setting `m_chars_touched_in_the_middle` to a non-zero value results in refreshing the whole line. So case-change operations now set that variable (causing a line refresh) in order to produce visible results as expected. --- Userland/Libraries/LibLine/InternalFunctions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibLine/InternalFunctions.cpp b/Userland/Libraries/LibLine/InternalFunctions.cpp index 21991959c6..94f51f9a44 100644 --- a/Userland/Libraries/LibLine/InternalFunctions.cpp +++ b/Userland/Libraries/LibLine/InternalFunctions.cpp @@ -494,8 +494,10 @@ void Editor::case_change_word(Editor::CaseChangeOp change_op) m_buffer[m_cursor] = to_ascii_lowercase(m_buffer[m_cursor]); } ++m_cursor; - m_refresh_needed = true; } + + m_refresh_needed = true; + m_chars_touched_in_the_middle = 1; } void Editor::capitalize_word()