Is kwrite known to be flaky? It has been picking up .cfg files by default so I have been using it as an editor, but every now and then it seems to drop the contents of the copy buffer wherever it feels like, or odd fragments of the current .cfg file appear elsewhere in the file. Nigel Kendrick