Sunday, September 28, 2014

Re: Patch 7.4.391 why?

On Saturday, September 27, 2014 10:34:03 PM UTC-5, Rick Howe wrote:
> Thank you for your help. I also tried a workaround like this.
>
> au WinEnter * call SetCursorLine(1)
> au WinLeave * call SetCursorLine(0)
> function! SetCursorLine(n)
> let &cursorline = a:n
> au! CursorMoved
> if a:n && &diff && winnr('$') >= 2
> au CursorMoved * let &cursorline = diff_hlID('.', 1) != hlID("DiffChange") && diff_hlID('.', 1) != hlID("DiffText")
> endif
> endfunction
>

That is a WAY more complicated workaround than just turning off cursorline on diff windows. I'd rather require a simpler workaround.

>
> However, my basic question is this patch is really reasonable or not.
> We can still see the highlitings of hlsearch and matchparen even if cursorline in on.

The difference in these, is:

1. These items rarely if ever cover an entire screen line, unlike the diff highlighting
2. These items can be turned off individually, unlike diff highlighting which is always on in diff mode
3. These items are transient, similar to cursorline
4. These items are visible in diff mode, unlike cursorline

I think the patch is reasonable. "Show me the cursor where it is right now" is more immediate and higher priority in my mind than "show me statically what lines changed".

> But why DiffChange and DiffText have to be hidden?
> It looks incompatible.
> I still want to see Diff highlightings in diff mode.
>

And you can if you turn off cursorline, or simply move the cursor. But you can't see cursorline unless you turn off diff, making diff mode less useful with cursorline.

> Is it possible to have a new setting option like cursorline's priority?

If we're going to go that far, I'd also like to be able to customize the priority of search, diff highlighting, etc. similar to controlling the priority of matches with matchadd().

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: