James Player wrote: > >From: Bram Moolenaar <[EMAIL PROTECTED]> > >Date: Sat, 15 Apr 2006 22:48:29 +0200 > > > >James Player wrote: > > > > > When I enable cursor line highlighting with ":set cul" and > > > I have syntax enabled, scrolling (j,k,l,h) becomes very slow, > > > especially for some file types (xml, ruby, ...) Is it expected. > > > >Yes, that is expected. Vim needs to redraw the whole window every time > >you move the cursor. Otherwise scrolling only redraws the text that > >appears. > > But it also happens when the cursor is moved without actually scrolling > the information on the screen. Can it be optimized not to redraw the > whole screen when only cursor position changes?
That is very complicated. 'cursorline' and 'cursorcolumn' were added mainly because it was a small change. Optimizing the redrawing is very complex and interferes with other things, e.g., Visual highlighting. It would also require caching the highlighting from before the line/column highlighting was applied. So the code is simplistic and if it's too slow for you then don't use it. -- I AM THANKFUL... ...for a lawn that needs mowing, windows that need cleaning and gutters that need fixing because it means I have a home. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://www.ICCF.nl ///
