[bug #16452] mcedit forgets POSIX newline at end of file
- From: Roland Illig <INVALID NOREPLY gnu org>
- To: Rudolf Polzer <nospam_rpolzer nospammail net>, Oswald Buddenhagen <ossi kde org>, Roland Illig <roland illig gmx de>, mc-devel gnome org
- Cc:
- Subject: [bug #16452] mcedit forgets POSIX newline at end of file
- Date: Sat, 29 Apr 2006 10:12:30 +0200
Follow-up Comment #4, bug #16452 (project mc):
mcedit is currently suitable for editing binary files, too. I wouldn't like
to give up this feature. So we had to do something like:
if (the current file looks like a text file) {
if (edit->size > 0 && get_byte(edit->size) != '\n') {
if (inputbox("This file does not end with a newline. "
"Shall we add it?", YES|NO|CANCEL) == YES) {
edit_insert_byte(edit->size, '\n');
}
}
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=16452>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]