trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: August 2012

Confirm kwrite update window when Remove spaces on save option set

From: "David C. Rankin" <drankinatty@...>
Date: Wed, 08 Aug 2012 09:55:32 -0500
All,

  I have noticed that kwrite does not behave as expected when Settings ->
Configure Editor -> Open/Save -> [x] 'Remove trailing spaces' is set.

  When set, trailing spaces ARE removed on 'save' (from the file saved to disk),
but the current editor window is NOT updated to show the removal (the spaces are
still present in what you are looking at on the screen).

  If you close the current file and reopen it (or F5 - Reload), then the removed
spaces disappear, but there is nothing that automates or forces a reload to
update the current window.

  The help says 'The editor will automatically eliminate extra spaces at the
ends of lines of text while loading/saving the file.' That indicates to me that
spaces will be removed on either load or save, and to me, that implies the
change should be apparent to the user. However, the spaces are only removed from
what is written to disk without updating the display (current line buffers - I
guess...)

  If current behavior is correct, then I think the setting dialog should read:

[x] Remove trailing spaces on save - Reload (F5) to update current window

  and the shift+f1 help should read:

'The editor will automatically eliminate trailing spaces (extra spaces at the
ends of lines of text) while saving the file to disk. A reload (F5) is required
to update the current editor window.'

  An alternative would be to force a reload after a save, but I do not like the
distraction of the flicker caused by the re-display of the text during reload. I
think that is probably why it was coded this way to begin with -- to eliminate
the flash on save caused by the redisplay.

  My vote is to simply update the option and the 'Shift+F1' help to make it
clear that spaces are only removed from what is written to disk and are not
removed from the current editor window.

  Thoughts?  (this would go in the feature requests priority box :) Not a big
deal, but before I forgot about it, I thought I would post it.

-- 
David C. Rankin, J.D.,P.E.