Re: [Fish-users] bug in computing COLUMNS?
Status: Beta
Brought to you by:
liljencrantz
|
From: Kurtis R. <kr...@sk...> - 2017-09-01 19:05:16
|
On Fri, Sep 1, 2017 at 9:55 AM, Greg Reagle <gre...@um...> wrote: > As seen in commit 2be1288 [1], this is deliberate: "If the resulting > values are not reasonable fallback to using 80x24." You can see what is > considered reasonable in the macro constants MIN_TERM_COL and > MIN_TERM_ROW defined in common.h [2]. So, if you are compiling fish for > yourself, you can change these values and recompile. > > What I don't understand is what the advantage of this behavior is. The > obvious disadvantage is that fish won't work properly when the terminal > is less than 20 columns. Whatever the advantage is, does it outweigh > the disadvantage. If this fallback logic is kept status quo, would it > make sense to decrease it from 20 to 10? > Fish won't work if the terminal height is less than two. I don't recall the exact value but it also won't behave sensibly if the width is much less than 20. Going from memory I'm pretty sure the lower bound is greater than 10. This tends to happen most often with console VTs where the size is frequently reported as zero for both values. See issue https://github.com/fish-shell/fish-shell/issues/2559. To give the user a chance of seeing some output and typing commands the current code assumes the stty values are invalid if they are unreasonably small and falls back to the legacy lowest common denominator of 80x24. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank |