From 5beb14cffe214e60cfeaca03a67c2432d4685d5e Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 19 Apr 2024 16:02:32 +0200 Subject: [PATCH] softwrap: realign start-of-screen when redoing an automatic hard-wrap Redoing an automatic hard-wrap while one or more chunks of the affected line are offscreen, can leave 'firstcolumn' with a value that doesn't fit the situation. So, make sure that it has a valid value. This complements the previous commit. This fixes https://savannah.gnu.org/bugs/?65611. The issue was reported by `correctmost`. Bug existed since version 2.8.6, commit e375995d. --- src/text.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/text.c b/src/text.c index 3f95df8e..6707da9b 100644 --- a/src/text.c +++ b/src/text.c @@ -759,6 +759,7 @@ void do_redo(void) do_redo(); u = openfile->current_undo; goto_line_posx(u->head_lineno, u->head_x); + ensure_firstcolumn_is_aligned(); break; case SPLIT_END: redidmsg = _("addition");