Skip to content

Autoscroll in pager#1223

Closed
psprint wants to merge 1 commit intojonas:masterfrom
psprint:Autoscroll-In-Pager
Closed

Autoscroll in pager#1223
psprint wants to merge 1 commit intojonas:masterfrom
psprint:Autoscroll-In-Pager

Conversation

@psprint
Copy link
Copy Markdown
Contributor

@psprint psprint commented Jul 21, 2022

A second attempt (after #1139) to add two features:

  • autoscroll in pager,
  • regex matching lines colorization in pager.

In this attempt I've did what has been recommended to me previously:

  • autoscroll is off by default so that tig resembles less (set pager-autoscroll = off),,
  • the regex used by the line colorization can be also customized via an option color-pager-regex.

I think that running make in pager is a good use case and it could be better supported.

@psprint
Copy link
Copy Markdown
Contributor Author

psprint commented Aug 13, 2022

@koutcher ping. I've worked on the patch and took all suggestions into account. I wonder what chances have this PR to merge?

@psprint
Copy link
Copy Markdown
Contributor Author

psprint commented Sep 1, 2022

@koutcher ping :)

@psprint
Copy link
Copy Markdown
Contributor Author

psprint commented Oct 1, 2022

@koutcher @krobelus merge?

@psprint
Copy link
Copy Markdown
Contributor Author

psprint commented Oct 6, 2022

@koutcher @krobelus ping 👋

return false;
}

if ((view->pos.offset + view->height + 1) == view->lines)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autoscroll seems like an interesting feature. I don't use the pager view but I can imagine autoscroll being useful.
I think this commit should be submitted in a separate PR, without the highlighting changes.

There seems to be an off-by-one error. When I type :!git log it only scrolls until the last-but-one line; the last line is not visible.

Instead of an option, we could also implement less's F command.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krobelus: I've updated the PR to cover only autoscroll feature and fixed the off by 1 error. I agree that autoscroll is useful, I'm using it all the time.

@psprint psprint force-pushed the Autoscroll-In-Pager branch from a92e5cb to ff9243c Compare December 27, 2022 13:36
@psprint psprint force-pushed the Autoscroll-In-Pager branch from ff9243c to cdd8baa Compare December 27, 2022 13:47
koutcher pushed a commit that referenced this pull request Dec 29, 2022
Autoscroll the pager view if a new option `pager-autoscroll` is set to `on`.

[tk: tweaked the code and added doc]
@koutcher
Copy link
Copy Markdown
Collaborator

Thanks. It needed a bit of rework to have things done at the proper place.

@koutcher koutcher closed this Dec 29, 2022
@psprint
Copy link
Copy Markdown
Contributor Author

psprint commented Dec 29, 2022

Thanks for merging :)

vxsl pushed a commit to vxsl/tig that referenced this pull request Mar 18, 2026
Autoscroll the pager view if a new option `pager-autoscroll` is set to `on`.

[tk: tweaked the code and added doc]
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.

3 participants