[Top][All Lists]

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

Re: [Nano-devel] Cursor location display (^C) displays columns numbered

From: Chris Allegretta
Subject: Re: [Nano-devel] Cursor location display (^C) displays columns numbered from 0
Date: Fri, 29 Mar 2002 10:18:44 -0500
User-agent: Mutt/1.3.25i

On Thu, Mar 28, 2002 at 03:04:48PM -0800, Andrew Ho wrote:
> Hello,
> A quick comment.
> I love the new behavior of nano starting with 1.1.7 where when you press
> ^C it displays the current column number as well as row and where you are
> in the file. However, I'm thinking column numbers, like row numbers,
> should be numbered from 1 instead of from 0.
> Nobody speaks of putting the cursor at column 0; instead, they speak of
> column 1. In an 80-column display you'd expect the rightmost column of the
> screen to be column 80, not column 79. This mirrors the behavior of the
> biggest users of the row-column paradigm, spreadsheets.
> >From a cursory glimpse at the code it looks like the easiest fix is the
> trivial display fix in winio.c.


        Thank you for the suggestion.  As a C programmer it's natural to
think of a string of text as starting at position 0 and ending at
length-1, but this certainly how one normally expects an editor to work,
sorry about that.  Also, in retrospect it seems odd to have the top left
corner of the editor be position (1,0) :-) I have changed the behavior
of the cursor position code to do what you request; version 1.1.8 will
reflect this change. Thank you for using nano and have a great weekend.

Chris A
Chris Allegretta

"Share and Enjoy" - Douglas Adams, 1952 - 2001

reply via email to

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