Skip to content

Commit

Permalink
fix: adjusted rendering based on terminal size by subtracting 2
Browse files Browse the repository at this point in the history
characters which appears to be a subtle padding effect at the terminal
boundaries
  • Loading branch information
RoseSecurity committed Nov 11, 2024
1 parent 6e184f2 commit be6e4ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ var docsCmd = &cobra.Command{
if term.IsTerminal(int(os.Stdout.Fd())) {
termWidth, _, err := term.GetSize(int(os.Stdout.Fd()))
if err == nil && termWidth > 0 {
screenWidth = termWidth
// Adjusted for subtle padding effect at the terminal boundaries
screenWidth = termWidth - 2
}
}

Expand Down

0 comments on commit be6e4ce

Please sign in to comment.