Skip to content

scroll_anchor setting#442

Open
Canop wants to merge 2 commits into
mainfrom
scroll-anchor
Open

scroll_anchor setting#442
Canop wants to merge 2 commits into
mainfrom
scroll-anchor

Conversation

@Canop
Copy link
Copy Markdown
Owner

@Canop Canop commented May 12, 2026

bacon sorts items, with errors first, followed by warnings.

The first items (on top if you don't have the reverse setting) are usually the most interesting ones.

But not always. For example, with the run job, when there's no error and the compiled binary is effectively executed, you may want to focus on the output of the program.
And if it's a long run, you probably want to have the scroll follow the new lines unless you decided to scroll away.

This PR introduces the scroll_anchor setting, whose value can be undefined, auto, first, or last.

When not defined, the applied default will be first.

In the default bacon.toml, the run and run-long jobs have scroll_anchor = "auto" which means that:

  • if errors were recorded, the default sticky position is the first item
  • if there was no error, the default stiky item is the last one (bacon then acting as tail to follow new lines)

This should fix #384 but there will be a test period before I try to merge it, or not. Feedback welcome.

@c-git
Copy link
Copy Markdown
Contributor

c-git commented May 12, 2026

Yeah this makes sense to me. I'll switch to this version and let you know what I think. If you want feedback before I feel I have anything useful just ping me and I'll tell you want I think so far. I don't quite have time to specifically test this but I will switch to this version and let you know how I feel using it. I've overridden the default long run job so I'd need to add the setting to auto to my job right?

@Canop
Copy link
Copy Markdown
Owner Author

Canop commented May 12, 2026

I'd need to add the setting to auto to my job right?

Yes. All user defined jobs are on "unspecified" which means "first".

@c-git
Copy link
Copy Markdown
Contributor

c-git commented May 12, 2026

I added scroll_anchor = "auto" to the top section of my prefs.tom because I can't at this point see when I wouldn't want that. Will let you know how it goes.

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.

[feature] Add option to tail the output/stick to scrolling to bottom

2 participants