8000 feat: Add option to toggle status line visibility by noborus · Pull Request #793 · noborus/ov · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add option to toggle status line visibility #793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 12, 2025
Merged

Conversation

noborus
Copy link
Owner
@noborus noborus commented Jun 12, 2025
  • Implemented the ability to hide/show the status line via command-line option, config, and runtime shortcut key
  • When the status line is hidden, it will only be shown in input mode or when a message is present

Implemented #426

- Implemented the ability to hide/show the status line
  via command-line option, config, and runtime shortcut key
- When the status line is hidden, it will only be shown in input mode
  or when a message is present

Implemented #426
@noborus noborus requested a review from Copilot June 12, 2025 02:01
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a new feature to toggle the status line visibility via configuration, command-line options, and a runtime shortcut.

  • Adds logic to compute and update the status line height based on runtime and message conditions.
  • Introduces tests for toggling behavior and integrates key bindings, configuration updates, and drawing logic modifications.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
oviewer/status_line.go Updates the status line drawing logic to conditionally hide/show based on status height.
oviewer/prepare_draw_test.go Adds tests to verify the correct determination of the status line based on various states.
oviewer/prepare_draw.go Updates the screen preparation logic to compute status line height using status settings.
oviewer/oviewer.go Introduces the status line field in the main configuration struct and binds it.
oviewer/keybind.go Adds a new key binding for toggling the status line.
oviewer/draw.go Modifies the drawing loop to account for the status line height.
oviewer/config.go Adds configuration support for enabling/disabling the status line.
oviewer/action_test.go Implements tests for the new status line toggle action.
oviewer/action.go Implements the toggleStatusLine action method.
main.go Registers and binds the CLI flag for the status line setting.
Comments suppressed due to low confidence (4)

oviewer/status_line.go:17

  • The variable 'statutsLineHeight' appears misspelled; consider renaming it to 'statusLineHeight' for clarity.
if root.scr.statutsLineHeight == 0 {

oviewer/prepare_draw.go:28

  • The field 'statutsLineHeight' is misspelled; renaming it to 'statusLineHeight' would improve readability and consistency.
root.Doc.statusPos = root.scr.vHeight - root.scr.statutsLineHeight

oviewer/oviewer.go:111

  • The field 'statutsLineHeight' seems misspelled; please rename it to 'statusLineHeight' to match common naming conventions.
statutsLineHeight int

oviewer/draw.go:59

  • The variable 'statutsLineHeight' appears misspelled; update it to 'statusLineHeight' to ensure consistency with related code.
for y := m.headerHeight; y < root.scr.vHeight-root.scr.statutsLineHeight; y++ {

@noborus noborus merged commit 5ffa3af into master Jun 12, 2025
9 checks passed
@noborus noborus deleted the status-line-toggle branch June 12, 2025 23:54
@visrosa
Copy link
visrosa commented Jun 14, 2025

Thank you for your work. Just tested it and it's great.

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.

2 participants
0