On Thu, 29 Oct 2020 18:06:16 -0700 Stefan Kangas wrote: > Stephen Berman writes: > >> Try the attached patch; does it do what you're suggesting well enough? > > Yes, it looks better. > >> I meant that in some uses of tabulated-list-mode there are columns whose >> default width is so narrow that, when selected for sorting, they are >> immediately truncated (using the patch in my previous post), e.g. the >> "Status" column in list-processes. And the issue is exacerbated with >> the current patch implementing your new suggestion: with its default >> width "Status" is now truncated whether selected or not. > > But the "Status" field in process-menu-mode is 7, so why is it > truncated when there is room? "Status" is only 6 characters. > > I would expect that "Status" was not truncated in this case, IOW that: > > - Without a sorting indicator > - label width <= column width => display it all > - label width > column width => truncate > > - With a sorting indicator > - label width <= column width => display it all > - label width > column width => truncate > > For the last column, we should probably just show it all regardless of > its width, and never truncate. > > Does the above make sense? It seems to. I did experiment a bit with the width when I made the patch just for the selected column and thought the length I used there gave the best results, but maybe that was too cautious. Does this patch give better results (it differs from the previous one only in the lengths checked and used for truncating):