Friday, June 30, 2006

Triple clicks

Text editors and line edits support the so-called triple clicks according to [1]. The document says
  • Triple Click: Select the targeted row. [...]
It is unclear whether the "targeted row" includes the trailing linebreak. Kate Part selects the targeted line including the linebreak. You get the following behavior:
  • If you move the selected row with the mouse, you usually have the linebreaks right. The same applies for copy/cut & paste. If you are used to it, it really is a nice feature.
While this behavior is pretty straightforward, it is not widely in use. If you look at text edit widgets like in firefox, konqueror, Qt, KWord or OOo you will notice that they do not include the trailing newline character.

Question now is: Should we change it for KDE 4 in Kate Part just to be compliant with the others? As Kate Part is an editor component mainly used for programming, my favourite option is to include it, i.e. to keep the current behavior.

(update) I just stumbled over =)



Alexander Dymo said...

No, please don't remove the feature. I do rely on it quite frequently.

Daniel Beck said...

All KDE-application should have compatible behavior. (In fact, it would also be nice if they also had compatible behavior with gnome application, firefox and OOo). Either Kate should change it or the other KDE-application should change it.

You could also:
*) introduce a different key/mouse-klick combination for the old behavior of Kate. Or...
*) allow to use the old combination by changing some variable in a configuration file, but that should be KDE-wide solution then.

(It's boring that all KDE-Application behave so differently, e.g, the tabs for Konsole and the tabs for Konqueror have completely different keystrokes)

Thomas Zander said...

The linked page has a footnote (nr 3) that explains the situation.
You are copying a row, not a paragraph. (which means KWord does it incorrectly) So, paragraph based apps should never include a linebreak for the plain and simple reason that there is no linebreak there!
I personally wish we had a 'soft space' and a 'soft enter' which would be used when pasting. So a soft-space would only be pasted if there was no space yet. Never having two spaces after a past. Same for enters.

All KDE application _except_ konsole has exactly the same keystrokes for tabs. Konsole just is not able to reuse keystrokes due to its nature. Keep that in perspective next time you complain :)