From 68c3aaf2df880206a10aa00eed5f26e793800790 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 27 Nov 2019 09:35:17 +0100 Subject: [PATCH] softwrap: when switching to another buffer, re-align the starting column When we switch to another buffer, the window may have been resized since we were last in this buffer, so make sure that 'firstcolumn' gets a fitting value. This fixes https://savannah.gnu.org/bugs/?56991. Bug existed since version 2.8.0, since the softwrap overhaul. --- src/files.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/files.c b/src/files.c index 4a6d522a..867fce86 100644 --- a/src/files.c +++ b/src/files.c @@ -610,6 +610,8 @@ void redecorate_after_switch(void) * turned softwrap mode off while in a different buffer. */ if (!ISSET(SOFTWRAP)) openfile->firstcolumn = 0; + else + ensure_firstcolumn_is_aligned(); #endif /* Update titlebar and multiline info to match the current buffer. */