Skip to content

Fix horizontal offset when enabling word-wrap#1622

Merged
tstack merged 1 commit intotstack:masterfrom
Yukigaru:fix-horizontal-scroll-reset-after-wrap
Feb 11, 2026
Merged

Fix horizontal offset when enabling word-wrap#1622
tstack merged 1 commit intotstack:masterfrom
Yukigaru:fix-horizontal-scroll-reset-after-wrap

Conversation

@Yukigaru
Copy link
Contributor

When a view is scrolled horizontally (left > 0) with word-wrap disabled, enabling word-wrap doesn't reset horizontal offset and keep user stuck in that shifted view.

Reproduction steps:

  • open a file with lines longer than your view
  • disable wrap
  • scroll right
  • enable wrap
  • now you don't see line beginnings and you're stuck in that horizontal offset until you disable wrap again.

Fix: reset that offset when word-wrap is enabled.

@tstack tstack merged commit a056757 into tstack:master Feb 11, 2026
2 of 5 checks passed
@Yukigaru Yukigaru deleted the fix-horizontal-scroll-reset-after-wrap branch February 11, 2026 18:43
@tstack
Copy link
Owner

tstack commented Feb 11, 2026

Thanks! I think I messed this up when I changed the handling of CTRL-W from being hardcoded to doing an UPDATE on the lnav_views table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants