# Cylc tui, jump to the end of a file you are viewing

**URL:** <https://cylc.discourse.group/t/cylc-tui-jump-to-the-end-of-a-file-you-are-viewing/1039>\
**Category:** Cylc Support\
**Created:** [October 15, 2024, 11:07am UTC](https://cylc.discourse.group/t/cylc-tui-jump-to-the-end-of-a-file-you-are-viewing/1039 "2024-10-15T11:07:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mo-arthurargles](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/mo-arthurargles/32/433_2.png) [@mo-arthurargles](https://cylc.discourse.group/u/mo-arthurargles)\
**Post date:** [October 15, 2024, 11:07am UTC](https://cylc.discourse.group/t/cylc-tui-jump-to-the-end-of-a-file-you-are-viewing/1039/1 "2024-10-15T11:07:12Z")

</div>

Hello,

Is there a short cut to jump to the end of a job file (e.g., job.out) or to search for a string?

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/9cde95538a3d713f17fa7180b85016b81fad012a.png)

---

<div class="post-metadata">

**Author:** ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)\
**Post date:** [October 15, 2024, 2:42pm UTC](https://cylc.discourse.group/t/cylc-tui-jump-to-the-end-of-a-file-you-are-viewing/1039/2 "2024-10-15T14:42:21Z")

</div>

The “Home” and “End” buttons on your keyboard should jump to the top / bottom of the file.

Tui doesn’t have a search functionality at present, the log viewer is very simple.

---

<div class="post-metadata">

**Author:** ![mo-arthurargles](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/mo-arthurargles/32/433_2.png) [@mo-arthurargles](https://cylc.discourse.group/u/mo-arthurargles)\
**Post date:** [October 15, 2024, 3:13pm UTC](https://cylc.discourse.group/t/cylc-tui-jump-to-the-end-of-a-file-you-are-viewing/1039/3 "2024-10-15T15:13:49Z")

</div>

Thanks Oliver,

When pressing “home” and “end” within cylc tui, I only jump down one line:

![cylctui_home_end](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/07553f78b1169aae0f039a5bd2cdd66aeb7eac7d.gif)

---

<div class="post-metadata">

**Author:** ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)\
**Post date:** [October 15, 2024, 4:15pm UTC](https://cylc.discourse.group/t/cylc-tui-jump-to-the-end-of-a-file-you-are-viewing/1039/4 "2024-10-15T16:15:00Z")

</div>

Hi,

You’re right, I was just testing with a very short log file!

I’m not sure why “end” doesn’t jump to the bottom. As a workaround, hitting the “page down” a few times will do it.

I’ve opened an issue to investigate: [tui: end key doesn't jump to bottom of log view · Issue #6419 · cylc/cylc-flow · GitHub](https://github.com/cylc/cylc-flow/issues/6419)

---

<div class="post-metadata">

**Author:** ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)\
**Post date:** [October 16, 2024, 3:31pm UTC](https://cylc.discourse.group/t/cylc-tui-jump-to-the-end-of-a-file-you-are-viewing/1039/5 "2024-10-16T15:31:58Z")

</div>

I’ve got a solution that will make the home/end keys do what we would expect them to. Will hopefully arrive in 8.3.6

> <https://github.com/cylc/cylc-flow/pull/6422>
>
> \* Allows navigating to the top/bottom of the log file.
> \* Closes https://github.…com/cylc/cylc-flow/issues/6419
> 
> The widget we are using (urwid.ListBox) does not support the home/end keys. Other widgets bring other problems as \`ListBox\` very elegantly handles the issue that we want to keep the focus on the file selector button (so you can change file by pressing enter) whilst being able to scroll the log file (which is a different component all together).
> 
> This PR adds a somewhat hacky but rather effective solution. When the user presses "home/end", fire off the "page up/down" key until the window stops scrolling (which happens when we hit the top/bottom of the ListBox).
> 
> \*\*Check List\*\*
> 
> \- \[x\] I have read \`CONTRIBUTING.md\` and added my name as a Code Contributor.
> \- \[x\] Contains logically grouped changes (else tidy your branch by rebase).
> \- \[x\] Does not contain off-topic changes (use other PRs for other changes).
> \- \[x\] Applied any dependency changes to both \`setup.cfg\` (and \`conda-environment.yml\` if present).
> \- \[x\] Tests are included (or explain why tests are not needed).
> \- \[\] Changelog entry included if this is a change that can affect users
> \- \[x\] \[Cylc-Doc\](https://github.com/cylc/cylc-doc) pull request opened if required at cylc/cylc-doc/pull/XXXX.
> \- \[x\] If this is a bug fix, PR should be raised against the relevant \`?.?.x\` branch.
