Bug#45780: Adding tabs screws up the line position and acts like a wordprocessor.

[email protected] 26 Jul 2002 05:11:55 -0000
Newsgroups gmane.comp.kde.devel.kate
Message-ID <[email protected]>
Package: kate
Version: CVS 2002-07-21 (using KDE 3.0.6 CVS/CVSup/Snapshot)
Severity: normal
Installed from:    Compiled sources
Compiler:          g++ 3.1.1
OS:                Linux
OS/Compiler notes: Not Specified

This bug didn't exist in late June and was "added" after that.  In kdelibs/kate/part/katedocument.cpp approx line 3603 in KateDocument::paintTextLine()
it says:


if (isTab)
xPosAfter -= (xposAfter % curAt->width(fs, *s));

This chunk of code was commented out stating that this caused Kate to act less like a wordprocessor and it fixes a brack problem.

What really happens, is that instead of moving to the tab column.  Like if if you have tabs set to 8 and you where at column 9 it should put you at column 16, it instead inserts 8 places or spaces if you have insert-spaces-for-tabs.

The immediate problem with that is that it the column count does not sync up with the position of the text.  If you insert tabs between some text, it might say it is at column 32 but in reality it is at column 45 or something.

The second problem, at least I think, is that Kate is more of a text editor and not a word processor.  If it didn't goof up "sync" between the reported column and the actualy column, this would be ok for a word processor.  If I want to write a letter to someone or a document, I'll use KWord.  If I want to write a program, I'll use Kate.

Maybe an option can be used to toggle between both modes?

Sorry for the rant, but this bug is really annoying and screws up the alignment of my code.




(Submitted via bugs.kde.org)


(Complete bug history is available at http://bugs.kde.org/db/45/45780.html)