Adding multiple-cursor functionality