RE: Saving file position in mcedit
- From: BARTHAZI Andras <andras barthazi hu>
- To: "'Pavel Roskin'" <proski gnu org>, <mc-devel gnome org>
- Subject: RE: Saving file position in mcedit
- Date: Sun, 1 Dec 2002 10:06:26 +0100
Hi!
> 1) The position is saved even if the file is not saved. I
> don't know if it's a bug, maybe not.
A good question. I think this way is _a bit_ better than not saving
position if file not saved. A problem can be, if you modify the file a
lot, and don't save it. I think it's rare. More common to edit the file
on just one line and quit w/o saving, or "edit" the file but just look
after something at a different position and next time you would like to
go back there. IMHO...
The "AI" way could be to always save the position, if you save the file,
then at the position at the current point, if you don't save it, then at
the position of the first modification's position. IMHO this is the way
it should be work, but I don't know if it worths to realize it... :)
> 2) The column position is saved (or restored - if we are
> saving the visible position, not the number of characters)
> incorrectly if there are tabs preceding the cursor on the
> line. That's clearly a bug, I hope to fix it soon.
My patch solved it, that's why I used that technique (that was a bit
ugly, but worked this way... :).
> 3) I don't like the filename ".mc/EditPos". All other
> editor-specific files are called ".mc/cedit/cooledit.*", so
> ".mc/cedit/cooledit.pos"
> would be more consistent. If we are going to use this file
> in the viewer some day, then again ".mc/filepos" would be
> more consistent with ".mc/history" and ".mc/hotlist" and not
> specific to the editor.
You are right.
> 4) I think that all saving and restoring positions should be
> moved from
> the dialog level to the widget level. This would allow us
> e.g. to restore
> positions in the files loaded by "Open file..." in the editor
> menu and
> save positions on "Save as". These actions happen inside
> run_dlg() for
> the editor.
You are right, again. :)
Bye,
Andras
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]