Christian Brabandt wrote:

> On Fr, 30 Mär 2012, Bram Moolenaar wrote:
> 
> > 
> > Christian Brabandt wrote:
> > 
> > > On Fri, March 30, 2012 00:41, Gary Johnson wrote:
> > > > On 2012-03-29, Christian Brabandt wrote:
> > > >> Bram,
> > > >>
> > > >> On Mi, 28 Mär 2012, Abu Yoav wrote:
> > > >>
> > > >> [...]
> > > >> > I am editing a text file (latex). I prefer that each paragraph be a
> > > >> > long line, and that vim wrap the text. That's the usual behaviour, 
> > > >> > and
> > > >> > that works fine. An option that seems very helpful is cursorline, so 
> > > >> > I
> > > >> > set it (":set cul"). However, this does not do what I want. Namely,
> > > >> > instead of highlighting the *visual* line I am on, it highlights the
> > > >> > whole paragraph. Is there any way to highlight only the current 
> > > >> > visual
> > > >> > line I am on? Again, a workaround would be to instruct vim to have
> > > >> > lines of at most 80 characters (say), but I don't want that.
> > > >>
> > > >> The help for 'cursorline' says:
> > > >>
> > > >> ,----
> > > >> |         Highlight the screen line of the cursor with CursorLine
> > > >> `----
> > > >>
> > > >> While 'cul' has always been highlighting complete lines. Do you think,
> > > >> this would warrant a new option, that changes 'cul' to only highlight
> > > >> screen lines or change the option 'cul' to a string option, that can be
> > > >> set to 'screen' or 'line'?
> > > >>
> > > >> This might be helpful for long lines (e.g. when editing csv files and
> > > >> wrap is set).
> > > >>
> > > >> If not, the documentation should be updated.
> > > >
> > > > Or declare it a bug and fix the behavior to match the documentation.
> > > 
> > > Well, here is a patch, that fixes it. I am not sure, whether this
> > > is a bug and this patch certainly makes 'cul' behave unexpectedly.
> > > 
> > > Would be good, if some people try it out,
> > > because the screen drawing code looks frightening to me ;)
> > 
> > I don't think we should change the current meaning of 'cursorline'.
> > What the original poster asked for is something else.
> > 
> > Since 'cursorline' is a boolean option we can't change it to be more
> > than an on/off switch.
> > 
> > That leaves adding Yet Another Option...
> 
> Here is a patch, using 'cursorscreenline'. Seems to work so far. 
> Additionally, it fixes a problem, that has been introduced with 7.3.479 
> where the cursorline wasn't drawn, when the number or relativenumber 
> option was set (line 3508 of screen.c) and removes an old leftover from 
> option.c, which doesn't seem to be necessary.

Thanks.  I'll check it out.

-- 
The greatest lies of all time:
  (1) The check is in the mail.
  (2) We have a really challenging assignment for you.
  (3) I love you.
  (4) All bugs have been fixed.
  (5) This won't hurt a bit.
  (6) Honey, I just need to debug this program and be home in 5 minutes.
  (7) I have just sent you an e-mail about that.
  (8) Of course I'll respect you in the morning.
  (9) I'm from the government, and I'm here to help you.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui