Line/col cursor position status is wrong

Nikos Chantziaras realnc at arcor.de
Thu Aug 20 21:31:32 BST 2009


On 08/20/2009 11:13 PM, Andreas Pakulat wrote:
> On 20.08.09 21:55:06, Andreas Pakulat wrote:
>> On 20.08.09 22:12:18, Nikos Chantziaras wrote:
>>> I use tabs instead of spaces for indentation, but the "Line: Y Col:
>>> X" position status (in the top-right of KDevelop) always counts Tabs
>>> as a single char.  For example if the cursor is at the beginning of
>>> the third line, the status says "Line: 3 Col: 1".  But if I move the
>>> cursor to the right over a tab (which is set up to be 8 spaces),
>>> instead of "Line: 3 Col: 9" it says "Line: 3 Col: 2".
>>>
>>> I wasn't able to find a setting that restores "classic" behavior.
>>> Note that if I use the standalone editor "KWrite" or "Kate", it
>>> works as expected.  The problem only exists in KDevelop.
>>
>> Interesting at least. A quick look at the code shows that both apps use
>> the same way of getting notified about cursor changes and use the same
>> way to show them. Not sure what makes the difference here...
>
> Well, it helps to look twice at it, there's a subtle difference in the
> two places. I've changed KDevelop now to also use the virtual cursor
> position which accounts for such tab-characters.

Thanks.  I've grabbed rev 1013825 of kdevplatform and can confirm that's 
it's working as intended now.





More information about the KDevelop mailing list