summaryrefslogtreecommitdiffstats
path: root/common.py
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-09-29 20:43:42 -0700
committerKenneth Graunke <[email protected]>2016-10-04 17:25:46 -0700
commitaf41e1a5009ce621e209932712ae424e9a01e7b2 (patch)
tree1a0c421323d8afd0595fd8bc46c53fe4628f8339 /common.py
parent8a484a63f8a7bc6c7b019502769c2adb80267fe9 (diff)
aubinator: Use less -RS instead of -r for the implicit pager.
From the less man page: "Warning: when the -r option is used, less cannot keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of control character). Thus, various display problems may result, such as long lines being split in the wrong place." Lines which are too long to fit in the terminal would be word wrapped, but unfortunately less would get confused about which line it was on, and text would be drawn on top of other text. The most noticable case was shader assembly, which is frequently too wide for an 80 character terminal, and thus would be drawn on top of the following state packets, making them completely unreadable. Using -R instead of -r fixes this problem by only allowing color escape sequences. (Notably, Git's implicit pager invocation uses -R.) Unfortunately, it means our "clear to the end of the line" hack for extending the blue bar headers won't work anymore. Word wrapping usually isn't terribly readable, anyway, so we also add the -S option (chop long lines) to restrict it to the terminal width. (You can hit the left and right arrow keys to scroll sideways.) Then, for a new blue bar hack, we can use a printf specifier to pad the command packet names to be 80 characters long (arbitrarily), which extends them "far enough" to look good, and doesn't require us to use ioctls to determine the terminal width. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Sirisha Gandikota <[email protected]>
Diffstat (limited to 'common.py')
0 files changed, 0 insertions, 0 deletions