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.
This commit is contained in:
@@ -610,6 +610,8 @@ void redecorate_after_switch(void)
|
|||||||
* turned softwrap mode off while in a different buffer. */
|
* turned softwrap mode off while in a different buffer. */
|
||||||
if (!ISSET(SOFTWRAP))
|
if (!ISSET(SOFTWRAP))
|
||||||
openfile->firstcolumn = 0;
|
openfile->firstcolumn = 0;
|
||||||
|
else
|
||||||
|
ensure_firstcolumn_is_aligned();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Update titlebar and multiline info to match the current buffer. */
|
/* Update titlebar and multiline info to match the current buffer. */
|
||||||
|
|||||||
Reference in New Issue
Block a user