[vte/vte-0-58] widget: Don't scroll to bottom on keystroke in read-only mode



commit 0855436a0b24a513afb2cca7b8fe6072ae7d250c
Author: Egmont Koblinger <egmont gmail com>
Date:   Sat Sep 14 22:41:52 2019 +0200

    widget: Don't scroll to bottom on keystroke in read-only mode
    
    https://gitlab.gnome.org/GNOME/gnome-terminal/issues/159
    (cherry picked from commit 016fd4690b85011b5691ff39ae269ad912a7e69e)

 src/vte.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index e7815b44..49a7f14f 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -4564,7 +4564,7 @@ Terminal::im_commit(char const* text)
        feed_child_using_modes(text, -1);
        /* Committed text was committed because the user pressed a key, so
         * we need to obey the scroll-on-keystroke setting. */
-       if (m_scroll_on_keystroke) {
+        if (m_scroll_on_keystroke && m_input_enabled) {
                maybe_scroll_to_bottom();
        }
 }
@@ -5242,7 +5242,7 @@ Terminal::widget_key_press(GdkEventKey *event)
                }
                /* Keep the cursor on-screen. */
                if (!scrolled && !modifier &&
-                   m_scroll_on_keystroke) {
+                    m_scroll_on_keystroke && m_input_enabled) {
                        maybe_scroll_to_bottom();
                }
                return true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]