nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] How to highlight cursor line


From: Benno Schulenberg
Subject: Re: [Nano-devel] How to highlight cursor line
Date: Mon, 4 Sep 2017 21:37:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


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?

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.

Benno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]