<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ul dir="auto">
<li><code class="notranslate">ssh</code> to a Linux box</li>
<li><code class="notranslate">seq 100</code></li>
<li>shrink the window vertically (fewer lines)</li>
<li>scroll back</li>
</ul>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">See the numbers from 1 to 100</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Lines get permanently lost as the window is made smaller, e.g. the sequence goes like ... 70 71 72 73 78 79 80 81 ...</p>
<h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">Currently, if you drag back the scrollbar and then resize the window, the viewport jumps back to the "regular" position (the end of the data buffer, and the bottom position of the scrollbar).</p>
<p dir="auto">It would be better to (approximately) maintain the scrolled position, so that the user keeps seeing whichever data was previously shown.</p>
<p dir="auto">In VTE we usually track the position at the bottom of the viewport and try to keep that at the bottom; except when fully scrolled back to the top. More details in <a href="https://gitlab.gnome.org/GNOME/vte/blob/master/doc/rewrap.txt" rel="nofollow">doc/rewrap.txt</a>.</p>