The screen

The screen is but a limited window onto the contents of a buffer. Unless a file is rather small, only a part of it can be made visible on the screen. The number of characters that stedi can display on a single line may depend on the computer or the size of the window in which stedi is running. Old terminal displays (as with most PC, AT, PS/2 and Atari ST systems) could show 80 characters per line in their standard text fonts. Many screens would allow only 25 lines on the screen. Current windows can be made smaller or bigger. If at all possible stedi will adapt to the local restrictions. One line is reserved to allow the user to type in commands, obtain messages from stedi and to see what the settings of some important parameters are. This leaves all other lines to be used to display text.

Lines that need more characters for their display than can be shown on a screen line can only be shown partially. This doesn't mean that the rest of the lines doesn't exist: it is simply not visible on the screen. Each line may actually contain up to 255 characters. If you attempt to add characters past this 255 character limit however, they simply will not be added. As for the length of an allowed file, stedi is only restricted by the memory of the computer. It seems that it can handle only 99999 lines since only 5 characters are allocated for the display of the line number. On the other hand, the internal line counter in stedi can deal with numbers up to $2^{31}$ for 32-bits systems.

Besides the lines which actually belong to the file, stedi knows the concept of `virtual lines'. These are lines beyond the end of the file that don't exist in reality (no characters are 'in' them and therefore they do not take up space in memory) but nevertheless the cursor can be moved to these lines. Likewise the cursor may be moved anywhere on the screen regardless of where the text appears. Thus not only can it be moved to virtual lines, but it can also be moved past the last character in any line to the virtual territory to the right of a line. The movement of the cursor is not restricted by the text in any way when it is moved around. This behaviour is completely different from what is found in some editors which have an annoying `dancing cursor' effect when the cursor is moved from line to line.

Aside from the case when a file is rather short and more virtual lines are necessary (for example, the `Hello World' program in Chapter 1), the number of virtual lines cannot exceed 5. This means that when you scroll down past the bottom of a file, the end of the file will scroll above the bottom of the screen until five blank (virtual) lines appear. Remember: these lines don't exist in so far as the file is concerned, so they are not written when the file is written to disk.