On Wed, January 30, 2013 08:07, Nazri Ramliy wrote: > On Tue, Jan 29, 2013 at 10:51 PM, Nazri Ramliy <[email protected]> wrote: >> For better distinction the current line number ca be left-aligned >> (for left-to-right text orientation) to make it look different than the >> relative-line-numbers (I made no attempt at this in the patch below). > > Here's a new patch that makes an attempt at the above. When rnu is on, > the current line number is flushed left, like this: > > 1 diff --git a/src/screen.c b/src/screen.c << Cursor at this line > 1 --- a/src/screen.c > 2 +++ b/src/screen.c > 3 @@ -2319,6 +2319,7 @@ > > Which distinguishes the current line number from the relative ones - > this makes it much much easier to differentiate between the two. > > In this new patch the logic for deciding whether to show the current > line or '0' is done outside of get_cursor_rel_lnum() which preserves > the function's original purpose. > > I'm attaching the patch (instead of inlining it just so that gmail > doesnt' change the tabs into spaces). > > While coming up with this patch I noticed that the formatting of the > line numbers (regardless of whether 'nu' or 'rnu' are set) are not > changed at all in right-to-left ('rl') mode - the single space that > separates the line numbers and the text are not placed in between the > two in right-left mode. I'm guessing that this is a bug.
Nice. Here is your patch updated and using the CursorLineNr highlighting for the line the cursor is on. regards, Christian -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
currlinenumber.patch
Description: Binary data
