[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] How to highlight cursor line
From: |
Marco Diego Aurélio Mesquita |
Subject: |
Re: [Nano-devel] How to highlight cursor line |
Date: |
Tue, 5 Sep 2017 15:38:30 -0300 |
On Tue, Sep 5, 2017 at 2:34 PM, Benno Schulenberg <address@hidden> wrote:
>
>
> -------- Doorgestuurd bericht --------
> Onderwerp: Re: [Nano-devel] How to highlight cursor line
> Datum: Mon, 4 Sep 2017 21:37:45 +0200
> Van: Benno Schulenberg <address@hidden>
> Aan: address@hidden
>
>
> Op 4-09-2017 om 17:33 schreef Marco Diego Aurélio Mesquita:
>>
>> I observed that finding the position of the cursor on a big monitor with a
>> small font can be a bit a hassle with nano.
>
>
> Why not change the terminal settings to show a bigger or blinking cursor?
> Or why not hold Shift and press <Up> and <Down> a few times in nano?
>
Because I want it to show where the cursor was when I use the
multipane feature I implemented. When switching panes, there's no
indication of where the cursor was.
>> I decided to try to implement a feature to not highlight the line number
>> on
>> the line where the cursor is.
>>
>> At first, I tried special casing the code in edit_draw to disable wattron
>> and
>> wattroff if row == openfile->current_y. It worked when enter is pressed or
>> when a backspace removes a line. To make it work when pressing Up/Down
>> arrow
>> keys, I tried experimenting with changes in do_up but could find no
>> reliable
>> way to repaint the lines where the cursor was and its new line.
>>
>> Is there a simple way to achieve what I want?
>
>
> Remove the last two ifs from edit_redraw(). Just the ifs, not the thens.
> That is: make it redraw 'current' and 'old_current' unconditionally.
>
I think I'll try to implement that later.