From cf75da9888a1b3b4b1c7b6052961a1920a29385e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 9 Jan 2017 15:00:29 +0100
Subject: [PATCH] softwrap: when pasting an overlong line, ensure it is fully
 visible

This fixes https://savannah.gnu.org/bugs/?50009.
---
 src/cut.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/cut.c b/src/cut.c
index aa42d943..0d591ab9 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -287,6 +287,11 @@ void do_uncut_text(void)
     /* Update the cursor position to account for the inserted lines. */
     reset_cursor();
 
+#ifndef NANO_TINY
+    if (ISSET(SOFTWRAP))
+	ensure_line_is_visible();
+#endif
+
     refresh_needed = TRUE;
 
 #ifndef DISABLE_COLOR
-- 
GitLab