Saturday, June 1, 2013

Re: Relative line numbering and current line

> I've modified my copy of screen.c with the attitude "you can't fight
> city hall" -- the bad news here is even with the zero back the width
> of that field stays huge on a big file, even though it dosn't need to
> -- I probably need to dig some more and find where it gets the width
> -- dang I hate this

It sounds like your modifications are the removal of the if blocks
around lines 2239 and 3510. To fix the width we need to edit the
number_width() function and replace

lnum = wp->w_buffer->b_ml.ml_line_count;

with

if (wp->w_p_rnu && !wp->w_p_nu)
lnum = wp->w_height;
else
lnum = wp->w_buffer->b_ml.ml_line_count;

I believe that will revert vim to the previous, cleaner behavior.

I worry that asking for other things besides zero (as Bee is) will get
the whole idea tossed out. On the other hand the absolute number
thing seems to have at least a couple of fans on the dev list, so
having a bunch of different possibilities for what gets put where the
zero belongs might be more likely than getting it reverted.

It's hard to see relative number users not objecting to the current
behavior. When I opened screen.c to find this stuff, I counted the
columns being used. It was 6. That is a lot of wasted screen in an
80 column terminal.

This is my first discussion on vim_use. Perhaps I should have brought
it up on the vim_dev list instead? I'm not sure it will get noticed
here.

--
--
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/groups/opt_out.

No comments: