End and Endif cursor commands implementation.