Commit a1fba434 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

pasting: restore the cap on the number of chunks to move backward

This fixes https://savannah.gnu.org/bugs/?51514.
No related merge requests found
Showing with 4 additions and 0 deletions
+4 -0
......@@ -2803,6 +2803,10 @@ int go_back_chunks(int nrows, filestruct **line, size_t *leftedge)
{
int i;
/* Don't move more chunks than the window can hold. */
if (nrows > editwinrows - 1)
nrows = (editwinrows < 2) ? 1 : editwinrows - 1;
#ifndef NANO_TINY
if (ISSET(SOFTWRAP)) {
/* Recede through the requested number of chunks. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment