Hi all,
I am new to Geany and I like it. But I wonder why the column number start from 0 instead from 1 in the status bar. I know that C and its derivatives makes index starting from 0 but it is strange that the first column does not appear with the number 1 like the first line is already numbered 1.
I did not find any configuration flag to modify that.
I use geany 0.20 under Ubuntu 10.04 from PPA repository.
Best regards JBF
On 4 November 2011 19:39, JBF jean-baptiste.faure@cemagref.fr wrote:
Hi all,
I am new to Geany and I like it. But I wonder why the column number start from 0 instead from 1 in the status bar. I know that C and its derivatives makes index starting from 0 but it is strange that the first column does not appear with the number 1 like the first line is already numbered 1.
Hi,
The caret, the cursor used by default in Geany is between characters rather than on them like older block cursors. The column indicated by the status bar is the character to the left of the caret, and when it is at the start of a line there is nothing to the left of it, hence column 0.
Cheers Lex
I did not find any configuration flag to modify that.
I use geany 0.20 under Ubuntu 10.04 from PPA repository.
Best regards JBF
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Le 04/11/2011 10:29, Lex Trotman a écrit :
On 4 November 2011 19:39, JBFjean-baptiste.faure@cemagref.fr wrote:
Hi all,
I am new to Geany and I like it. But I wonder why the column number start from 0 instead from 1 in the status bar. I know that C and its derivatives makes index starting from 0 but it is strange that the first column does not appear with the number 1 like the first line is already numbered 1.
Hi,
The caret, the cursor used by default in Geany is between characters rather than on them like older block cursors. The column indicated by the status bar is the character to the left of the caret, and when it is at the start of a line there is nothing to the left of it, hence column 0.
I understand, but the usefulness of the value after "col:" in the status bar is to indicate in which column you will write if you type a key now. Not the number of characters before that position.
Best regards. JBF
Lex writes:
The caret [...] is between characters rather than on them like older block cursors. The column indicated by the status bar is the character to the left of the caret [...].
JBF writes:
I understand, but the usefulness of the value after "col:" in the status bar is to indicate in which column you will write if you type a key now. Not the number of characters before that position.
I don't really use Geany very often, so I haven't noticed this before, but I agree with JBF. There is nothing wrong with the reasoning given by Lex, which I also understand completely, but the fact is that virtually every editor out there gives you the column of the character immediately to the right of the vertical bar. Regardless of which way is "more logical", most of us are used to having the column number tell us which character we are about to type next. (And if an error message or search result tells us to go to a particular position in the file, we expect that putting the caret there will result in having our error/result show up immediately to the right of the vertical bar.)
All that said, I think it's not too big a deal. I guess a preference setting might be nice, but there are already a huge number of settings. And plenty of Geany users have not been bothered by the status bar, so either they don't use it, or they don't care, or they have adjusted to it.
John
On Fri, 04 Nov 2011 09:39:34 +0100 JBF jean-baptiste.faure@cemagref.fr wrote:
I am new to Geany and I like it. But I wonder why the column number start from 0 instead from 1 in the status bar. [...]
I did not find any configuration flag to modify that.
Open the manual and find "statusbar_template". Using %C instead of %c shows 1-based column.
Le 05/11/2011 20:15, Dimitar Zhekov a écrit :
On Fri, 04 Nov 2011 09:39:34 +0100 JBFjean-baptiste.faure@cemagref.fr wrote:
I am new to Geany and I like it. But I wonder why the column number start from 0 instead from 1 in the status bar. [...]
I did not find any configuration flag to modify that.
Open the manual and find "statusbar_template". Using %C instead of %c shows 1-based column.
Works fine. Thanks !
Best regards. JBF