Marks on scrollbar: smarter navigation (center the mark vertically) #17877

Open
opened 2026-01-31 05:57:10 +00:00 by claunia · 4 comments
Owner

Originally created by @jkuebart on GitHub (Jul 7, 2022).

Description of the new feature/enhancement

Since #12948 we have the long-awaited marks on the scrollbar, along with the possibility to navigate between them.

Unfortunately, the navigation isn't very smart yet. When jumping to the previous/next mark, the window area merely scrolls such that the marked line becomes visible.

It would be much nicer if

  • the marked line would end up somewhere near the middle of the window – more often than not, what I'm interested in is the content directly above or below the mark, and this would then be immediately visible.
  • the line was highlighted (briefly) after the navigation action – this would make it easy to immediately find the marked line visually.

Proposed technical implementation details (optional)

The »jump to mark« command should scroll the window area such that the target line ends up near the middle of the screen whenever possible. A temporary highlight effect should be used to visually guide the user to the target line.

Originally created by @jkuebart on GitHub (Jul 7, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Since #12948 we have the long-awaited marks on the scrollbar, along with the possibility to navigate between them. Unfortunately, the navigation isn't very smart yet. When jumping to the previous/next mark, the window area merely scrolls such that the marked line becomes visible. It would be *much* nicer if - the marked line would end up somewhere near the middle of the window – more often than not, what I'm interested in is the content directly above or below the mark, and this would then be immediately visible. - the line was highlighted (briefly) after the navigation action – this would make it easy to immediately find the marked line visually. # Proposed technical implementation details (optional) The »jump to mark« command should scroll the window area such that the target line ends up near the middle of the screen whenever possible. A temporary highlight effect should be used to visually guide the user to the target line.
claunia added the Area-SettingsIssue-TaskProduct-TerminalArea-TerminalControl labels 2026-01-31 05:57:10 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 7, 2022):

These are great ideas to include as a part of #11000. I'm gonna split this into two issues to help better track these requests. Let's use this thread for "the target line ends up near the middle of the screen", and I'll fork off the other request.

@zadjii-msft commented on GitHub (Jul 7, 2022): These are great ideas to include as a part of #11000. I'm gonna split this into two issues to help better track these requests. Let's use this thread for "the target line ends up near the middle of the screen", and I'll fork off the other request.
Author
Owner

@Jaykul commented on GitHub (Jul 11, 2022):

Are we sure we want the target near the middle of the screen? If we're auto-marking prompts, the most common marks are going to be at the start (or end, depending on how you think of it) of a command.

With that turned on (the way I have it right now) I want to see the mark at or near the top of the screen, so I can see as much of the output as possible.

Incidentally, it would be nice if the mark functionality followed the behavior of (and even key-bindings for) search, regardless -- so if we had a way to make it appear near the center of the screen, it should be optional, and should would work for both.

@Jaykul commented on GitHub (Jul 11, 2022): Are we sure we want the target near the middle of the screen? If we're auto-marking prompts, the most common marks are going to be at the **start** (or **end**, depending on how you think of it) of a command. With that turned on (the way I have it right now) I want to see the mark at or _near_ the top of the screen, so I can see as much of the output as possible. Incidentally, it would be nice if the mark functionality followed the behavior of (and even key-bindings for) search, regardless -- so if we had a way to make it appear near the center of the screen, it should be optional, and should would work for both.
Author
Owner

@zadjii-msft commented on GitHub (Jul 11, 2022):

Don't worry, that's how I already interpreted this request - as a request for an optional setting here:

  • #13449 - center or some other setting that controls how the mark is scrolled in.
    • Maybe top (current) / center (as proposed) /nearestEdge (when scrolling down, put the mark at the bottom line of viewport , up -> top line)?

Frankly, I'm a huge fan of the "scroll s.t. the mark appears at the top of the viewport" style, for the same reason you've mentioned above. But if folks want to optionally scroll the prompt to the middle of the viewport, that doesn't seem terribly difficult to implement or maintain.

@zadjii-msft commented on GitHub (Jul 11, 2022): Don't worry, that's how I already interpreted this request - as a request for an optional setting here: > * [ ] #13449 - `center` or some other setting that controls how the mark is scrolled in. > * Maybe `top` (current) / `center` (as proposed) /`nearestEdge` (when scrolling down, put the mark at the bottom line of viewport , up -> top line)? Frankly, I'm a huge fan of the "scroll s.t. the mark appears at the top of the viewport" style, for the same reason you've mentioned above. But if folks want to optionally scroll the prompt to the _middle_ of the viewport, that doesn't seem terribly difficult to implement or maintain.
Author
Owner

@jkuebart commented on GitHub (Jul 11, 2022):

Are we sure we want the target near the middle of the screen? If we're auto-marking prompts, the most common marks are going to be at the start (or end, depending on how you think of it) of a command.

With that turned on (the way I have it right now) I want to see the mark at or near the top of the screen, so I can see as much of the output as possible.

While this sounds convincing, I have thought about it and this is how I can describe the use case: The marked prompts are indeed between the interesting content which is the command output. In my experience, very frequently I need the end of the output of some historical command just before the next prompt. For example, this is the case for error messages at the end of a compilation run whose complete output doesn't fit on a screen.

With the current behaviour, finding this requires skipping one prompt further up and then back down again to reveal the end of the command output, which is inconvenient.

Hope I could provide some explanation for this feature request ;-)

@jkuebart commented on GitHub (Jul 11, 2022): > Are we sure we want the target near the middle of the screen? If we're auto-marking prompts, the most common marks are going to be at the **start** (or **end**, depending on how you think of it) of a command. > > With that turned on (the way I have it right now) I want to see the mark at or _near_ the top of the screen, so I can see as much of the output as possible. While this sounds convincing, I have thought about it and this is how I can describe the use case: The marked prompts are indeed **between** the interesting content which is the command output. In my experience, very frequently I need the **end** of the output of some historical command just **before** the next prompt. For example, this is the case for error messages at the end of a compilation run whose complete output doesn't fit on a screen. With the current behaviour, finding this requires skipping one prompt further up and then back down again to reveal the end of the command output, which is inconvenient. Hope I could provide some explanation for this feature request ;-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17877