Closed Bug 891849 Opened 11 years ago Closed 11 years ago

mach's terminal magic causes weird jumps to the bottom

Categories

(Firefox Build System :: General, enhancement, P5)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: ttaubert, Assigned: Sahilc.2200)

References

Details

(Whiteboard: [mach][mentor=gps][lang=python])

Attachments

(1 file, 1 obsolete file)

Since recently (probably about two days ago) mach's console output always jumps to the bottom of a terminal even if the current line starts at the top. The status bar at the bottom makes a lot of sense after the whole terminal screen has been filled but not when it's actually empty (e.g. after hitting Ctrl+L). The previous behavior was a lot better, IMO.
This is fallout from bug 875684.

STR:

1) ctrl+l (wipe screen)
2) mach build

Output looks like:

----------------------------
|_>
|
|
|0:00.23 /usr/bin/make -f client.mk -s
| TIER: base nspr nss ...
----------------------------

Before, if the terminal was empty, new lines would be printed where the cursor is (typically at the top of the terminal) and the footer would be rendered where the cursor is. Now, the footer is always displayed at the bottom of the terminal and new lines are printed 1 line above the bottom of the terminal.

This is definitely an unintended consequence of bug 875684. I don't want to revert that patch because it is important for this terminal magic to work with screen. But, I don't think this is high enough priority for me to actively look at it.

If someone can deliver a patch that restores the old behavior and also works in screen, I will happily accept it.
Severity: normal → enhancement
Component: mach → Build Config
Depends on: 875684
OS: Linux → All
Priority: -- → P5
Hardware: x86_64 → All
Whiteboard: [mach][mentor=gps][lang=python]
Hi, please review this patch. Seems to be working on Tmux , and the gnome terminal
Comment on attachment 788332 [details] [diff] [review]
Added a count to track number of lines, Seems to work on tmux

For future reference you need to add a review flag to an attachment. If you forget, it's likely patches sit around a long time until someone stumbles upon the bug.
Attachment #788332 - Flags: review?(gps)
Comment on attachment 788332 [details] [diff] [review]
Added a count to track number of lines, Seems to work on tmux

Review of attachment 788332 [details] [diff] [review]:
-----------------------------------------------------------------

Not granting review for a few reasons.

First, global variables are mostly evil and should be avoided.

Second, this patch doesn't work on my iTerm terminal. It clears the screen at the beginning of the build and prints the footer line multiple times as the terminal window is filling up.
Attachment #788332 - Flags: review?(gps) → review-
Tried a different strategy to fix this bug. Please review.
Attachment #788332 - Attachment is obsolete: true
Attachment #791466 - Flags: review?(gps)
Comment on attachment 791466 [details] [diff] [review]
Patch for bug fix

Review of attachment 791466 [details] [diff] [review]:
-----------------------------------------------------------------

This appears to work! I'll mark this checkin-needed and it will be checked (hopefully within a few hours).
Attachment #791466 - Flags: review?(gps) → review+
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f673d2423e08
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: