Skip to content

top: abend on sequence of window hiding, selecting, and unhiding

This sequence of interactions reliably causes top to abend:

Enter alternative display mode (type "A")
Hide all windows (type "_")
Change current window two or more times (type "a" or "w" two or more times)
Unhide all windows (type "_")

The issue traces back to the begtask member of WIN_t becoming negative in mkVIZrow1 when handling "a" or "w" key presses in keys_window:

      case 'a':
      case 'w':
         if (ALTCHKw) {
            win_select(ch);
            mkVIZrow1
         }
         break;

I'm not familiar enough with the code to know if this is a solution, but the problem did not occur when this change was made:

      case 'a':
      case 'w':
         if (ALTCHKw) {
            win_select(ch);
            if (CHKw(Curwin, Show_TASKON)) {
               mkVIZrow1
            }
         }
         break;