> First are the colorise and fold components called with partial files?
Yes. They are normally called from the most recent point lexed or
from the most recent change (if before) to the last visible line. They
are always given ranges of whole lines. If you load half a file, and
allow UI activity before loading another block then the data already
loaded may be lexed.
> How does the program determine which part of the file is appropriate
> for refresh. Could it start you in the middle of a switch statement
> if you managed to fold on case entries inside the switch?
It may start at any line as described above.
> Can you reset the offered partial refresh and force a full refresh if
> desired?
The lexer may set styles anywhere in the document, not just in the
range it is asked to lex.
Neil