From: Stefan Sperling Subject: Re: tog: add horizontal scroll to tree view (+ minor refactor) To: Mark Jamsek Cc: Game of Trees Date: Wed, 1 Feb 2023 13:47:21 +0100 On Wed, Feb 01, 2023 at 10:40:44PM +1100, Mark Jamsek wrote: > As per discussion with op in the previous thread adding hscroll to ref > view, add hscroll to the tree view too. With this, all views now support > sideways scrolling :) > > While here, remove some copypasta with a new subroutine for hscroll > input. > > The new routine introduces a small change in behaviour for the blame, > diff, and help views such that the rightmost position now centers the > end of the longest line on the screen. Previously, for these three views > only, we would continue scrolling till the end of the longest line > finished about one-third into the view. > > I don't think it matters enough to add another int parameter to the new > horizontal_scroll_input() routine just to make the rightmost position > dependent on the view. In fact, it's probably better to keep it > consistent across all views. But I'm happy either way if you think we > should. > > tog(1) has been updated by moving the relevant keymaps to global space; > runtime help was already like this. > > I haven't committed the ref view hscroll change yet but this diff > applies on top of that one. I like this a lot, as it makes tog a bit more userfriendly. ok stsp