Skip to content

Commit

Permalink
Fix text rendering when viewing man pages
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Dec 1, 2024
1 parent 0280fdb commit e4e5c9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion v2/keyloop.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func Loop(tty *vt100.TTY, fnord FilenameOrData, lineNumber LineNumber, colNumber
if *parentIsMan {
// The parent process is "man", but NROFF_FILENAME has not been set:
// This means that ctrl-space has been pressed a second time when editing an Nroff file, so switch back to Nroff mode.
if env.No("NROFF_FILENAME") {
if env.Has("ORBITON_SPACE") && env.No("NROFF_FILENAME") {
e.mode = mode.Nroff
} else {
e.mode = mode.ManPage
Expand Down
1 change: 1 addition & 0 deletions v2/quit.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ func quitToNroff(tty *vt100.TTY, backupDirectory string, w, h uint) error {

env.Unset("NROFF_FILENAME")
env.Unset("MANPAGER")
env.Set("ORBITON_SPACE")

env.Set("COLUMNS", strconv.Itoa(int(w)))
env.Set("LINES", strconv.Itoa(int(h)))
Expand Down

0 comments on commit e4e5c9f

Please sign in to comment.