<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="guide" id="pref-scrolling" lang="zh_CN">

  <info>
    <revision pkgversion="3.8" date="2013-02-25" status="draft"/>
    <revision pkgversion="3.12" date="2014-09-08" status="review"/>
    <revision version="0.2" pkgversion="3.34" date="2020-01-04" status="review"/>
    <link type="guide" xref="index#preferences"/>
    <link type="guide" xref="pref#profile"/>

    <credit type="author copyright">
      <name>Sindhu S</name>
      <email>sindhus@live.in</email>
      <years>2013</years>
    </credit>
    <credit type="copyright editor">
      <name>Ekaterina Gerasimova</name>
      <email>kittykat3756@gmail.com</email>
      <years>2013–2014</years>
    </credit>

    <license xmlns="http://projectmallard.org/1.0/">

  <p>This work is licensed under a
  <link href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
  Attribution-Share Alike 3.0 Unported License</link> and a
  <link href="http://www.gnu.org/licenses/">GNU General Public License version
  3</link>. It may be redistributed and/or modified under either license.</p>

  <p>GPL 3 statement:</p>
  <p>This work is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3 as
  published by the Free Software Foundation.</p>

  <p>This work is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.</p>

  <p>You should have received a copy of the GNU General Public License
  along with this program. If not, see http://www.gnu.org/licenses/.</p>
</license>

    <desc>Change the scroll output and scrollbar behavior.</desc>
  </info>

  <title>Scrollbar preferences</title>

  <p>When a lot of output is printed to your terminal screen, it can be helpful
  to have your terminal behave in a specific manner so that it is easier to
  work with.</p>

  <section id="visibility">
    <title>Scrollbar visibility</title>

    <p>You can disable the scrollbar:</p>

    <steps>
      <item>
        <p>Press the menu button in the top-right corner of the window and select
        <gui style="menuitem">Preferences</gui>.</p>
      </item>
      <item>
        <p>In the sidebar, select your current profile in the <gui>Profiles</gui>
        section.</p>
      </item>
      <item>
        <p>Select <gui style="tab">Scrolling</gui>.</p>
      </item>
      <item>
        <p>Uncheck <gui>Show scrollbar</gui>.</p>
      </item>
    </steps>

    <p>Your preference is saved immediately.</p>

  </section>

  <section id="on-output">
    <title>Scroll on output</title>

    <p>You can lock scrolling so that it always shows the newest output while a
    command executes and produces output.</p>

    <steps>
      <item>
        <p>Press the menu button in the top-right corner of the window and select
        <gui style="menuitem">Preferences</gui>.</p>
      </item>
      <item>
        <p>In the sidebar, select your current profile in the <gui>Profiles</gui>
        section.</p>
      </item>
      <item>
        <p>Select <gui style="tab">Scrolling</gui>.</p>
      </item>
      <item>
        <p>Check <gui style="checkbox">Scroll on output</gui>.</p>
      </item>
    </steps>

  </section>

  <section id="on-keystroke">
    <title>Scroll on input</title>

    <p>You can set the terminal to automatically scroll to the bottom of the
    window when you input text into the prompt.</p>

    <steps>
      <item>
        <p>Press the menu button in the top-right corner of the window and select
        <gui style="menuitem">Preferences</gui>.</p>
      </item>
      <item>
        <p>In the sidebar, select your current profile in the <gui>Profiles</gui>
        section.</p>
      </item>
      <item>
        <p>Select <gui style="tab">Scrolling</gui>.</p>
      </item>
      <item>
        <p>Check <gui style="checkbox">Scroll on keystroke</gui>.</p>
      </item>
    </steps>
  </section>

  <section id="lines">
    <title>Scrollback lines</title>

    <p>You can limit the number of lines of terminal output which are
    remembered.</p>

    <steps>
      <item>
        <p>Press the menu button in the top-right corner of the window and select
        <gui style="menuitem">Preferences</gui>.</p>
      </item>
      <item>
        <p>In the sidebar, select your current profile in the <gui>Profiles</gui>
        section.</p>
      </item>
      <item>
        <p>Select <gui style="tab">Scrolling</gui>.</p>
      </item>
      <item>
        <p>Check <gui>Limit scrollback to</gui> and enter a number of lines
        to limit scrollback.</p>
      </item>
      <item>
        <p>Optionally, you can click on <gui style="button">+</gui> to
        increase and <gui style="button">-</gui> to decrease lines.</p>
      </item>
    </steps>

    <p>You can choose to have unlimited scrollback.</p>

    <steps>
      <item>
        <p>Press the menu button in the top-right corner of the window and select
        <gui style="menuitem">Preferences</gui>.</p>
      </item>
      <item>
        <p>In the sidebar, select your current profile in the <gui>Profiles</gui>
        section.</p>
      </item>
      <item>
        <p>Select <gui style="tab">Scrolling</gui>.</p>
      </item>
      <item>
        <p>Uncheck <gui>Limit scrollback to</gui>.</p>
      </item>
    </steps>

    <note style="tip">
      <p>Scrollback data is stored in compressed and encrypted files on disk,
      under the system’s default location for temporary files (usually
      <file>/tmp</file>). These files are unlinked immediately after their
      creation, and as such, do not show up in the directory listing. The
      occupied disk space is freed up as soon as the corresponding terminal
      closes.</p>
    </note>

    <note style="warning">
      <p>Make sure you have sufficient disk space available for these temporary
      files. If in doubt, monitor disk usage for example with the command
      <cmd>du /tmp</cmd>.</p>
    </note>

    <note style="important">
      <p>A giant scrollback buffer makes resizing the terminal window slower.
      As a rule of thumb, resizing gets noticeably slow at around 1 million
      lines.</p>
    </note>

  </section>

</page>
