nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] the cursor getting placed outside the terminal


From: Benno Schulenberg
Subject: Re: [Nano-devel] the cursor getting placed outside the terminal
Date: Wed, 28 Jun 2017 17:48:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1


Op 28-06-2017 om 17:10 schreef David Ramsey:
Hmmm.  I was actually resizing the terminal to 50x24.

You saw misplacement of the cursor when the terminal is actually
fifty columns wide?  If so, can you also reproduce it with the
master branch?  If yes, then please report a bug on Savannah.
(Best will be to not use any nanorc, but to always use --ignore
and add the options you need to see the effect.)

The cause is that when the position is displayed on the bottom row of
the screen, it doesn't fit, and the actual cursor remains "stuck" in
column 51 of the bottom row.  But ncurses thinks that the cursor
cannot go offscreen, so it thinks it must be in column 50.  So when
the cursor is moved to row 2, column 50, ncurses just sends a bunch of
cursor-up commands and thinks it has put the cursor in the right
place.

So it's really an ncurses bug, then?

No, Thomas says it's not, because one shouldn't use stty to set
things to a size the terminal doesn't actually have.  Ncurses counts
on the cursor not being /able/ to go further than what COLS says.

Okay.  Not to mention that with the latest varisoft change (thank you
for applying it, by the way), the cursor is no longer placed past the
end of the screen anyway.

Ah.  So the effect you saw was because nano was trying to go
outside the terminal's edges?

Benno



reply via email to

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