Improve perf of editor by limiting cursor/selection update