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



commit 016fd4690b85011b5691ff39ae269ad912a7e69e
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

 src/vte.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index fc772a37..654dc498 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -4545,7 +4545,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();
        }
 }
@@ -5223,7 +5223,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]