Skip to content
Snippets Groups Projects
  • Rob Swindell's avatar
    ca770865
    Fix random menu/display file selection when some files can't be displayed · ca770865
    Rob Swindell authored
    When one or more files that match the menu file pattern can't be displayed
    (e.g. the user's terminal is not wide enough or there's any other menu file
    open/read error), pick another random menu file and try displaying that one,
    until either a menu file has been displayed successfully or all files
    (matching the pattern) have been attempted.
    
    For example, you have text/menu/random1.c80.msg and random2.msg, if the first
    file (random1.c80.msg) is selected at random but the user's terminal isn't
    at least 80 columns wide, another file will be picked at random. Since only
    random2.msg remains in the list (matching the pattern "random*"), that's the
    only file that will always be displayed.
    ca770865
    History
    Fix random menu/display file selection when some files can't be displayed
    Rob Swindell authored
    When one or more files that match the menu file pattern can't be displayed
    (e.g. the user's terminal is not wide enough or there's any other menu file
    open/read error), pick another random menu file and try displaying that one,
    until either a menu file has been displayed successfully or all files
    (matching the pattern) have been attempted.
    
    For example, you have text/menu/random1.c80.msg and random2.msg, if the first
    file (random1.c80.msg) is selected at random but the user's terminal isn't
    at least 80 columns wide, another file will be picked at random. Since only
    random2.msg remains in the list (matching the pattern "random*"), that's the
    only file that will always be displayed.