- files.c:
check_writable_directory()
- Stat full_path, not path (Steven Kneizys).
+ open_pipe()
+ - I18nize the pipe error (DLR).
read_file()
- Abort if we read a file of 0 lines (num_lines == 0), fixes BUG #70.
- Reverse tests to stop segfault on editing a new file of 0
lines (David Benbennick)
- Change input var to one char instead of array (David Benbennick).
+ - Move NO_CONVERT check up so chars get read in properly (DLR).
- nano.c:
do_justify()
- More fixes for indented justify (David Benbennick).
- winio.c:
do_credits()
- Add Thomas Dickey.
+ update_line(), xpt()
+ - Add check for 127 (DLR).
- po/sv.po:
- Swedish translation updates (Christian Rose).
- po/de.po:
- German translation updates (Michael Piefel).
- po/id.po:
- Indonesian translation updates (Tedi Heriyanto).
+- po/it.po:
+ - Serious typo (DLR).
- po/ca.po, po/es.po:
- Catalan and Spanish translation updates (Jordi).
+ - Typo (DLR).
- po/fr.po:
- French translation updates (Jean-Philippe Guérard).
- po/gl.po:
totsize += strlen(cutbuffer->data);
if (strlen(cutbuffer->data) == 0)
totlines++;
+ /* If we've uncut a line, make sure there's a magicline after
+ it */
+ if (current->next == NULL)
+ new_magicline();
placewewant = xplustabs();
update_cursor();
/* Read the entire file into file struct */
while ((size = read_byte(fd, filename, &input)) > 0) {
+#ifndef NANO_SMALL
+ if (!ISSET(NO_CONVERT) && input >= 0 && input <= 31
+ && input != 127 && input != '\t' && input != '\r'
+ && input != '\n')
+ /* If the file has binary chars in it, don't stupidly
+ assume it's a DOS or Mac formatted file! */
+ SET(NO_CONVERT);
+#endif
+
if (input == '\n') {
fileptr = read_line(buf, fileptr, &line1ins);
num_lines++;
buf[0] = 0;
i = 0;
#ifndef NANO_SMALL
- } else if (!ISSET(NO_CONVERT) && input >= 0 && input <= 31
- && input != '\t' && input != '\r'
- && input != '\n')
- /* If the file has binary chars in it, don't stupidly
- assume it's a DOS or Mac formatted file! */
- SET(NO_CONVERT);
-
/* If it's a Mac file (no LF just a CR), and file conversion
isn't disabled, handle it! */
- else if (!ISSET(NO_CONVERT) && i > 0 && buf[i-1] == '\r') {
+ } else if (!ISSET(NO_CONVERT) && i > 0 && buf[i-1] == '\r') {
fileformat = 2;
fileptr = read_line(buf, fileptr, &line1ins);
num_lines++;
/* Make our pipes. */
if (pipe(fd) == -1) {
- statusbar("Could not pipe");
+ statusbar(_("Could not pipe"));
return 1;
}
filestruct * current_open_file;
#endif
-#ifdef ENABLE_MULTIBUFFER
+#ifndef DISABLE_OPERATINGDIR
if (operating_dir != NULL)
free(operating_dir);
if (full_operating_dir != NULL)
#: files.c:1414
msgid " [Mac Format]"
-msgstr " [Formatp Mac]"
+msgstr " [Formato Mac]"
#: files.c:1416
msgid " [DOS Format]"
#: nano.c:1758
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
-msgstr ""Salva il buffer modificato? (RISPONDENDO \"No\" ANNULLERETE I CAMBIAMENTI AVVENUTI) "
+msgstr "Salva il buffer modificato? (RISPONDENDO \"No\" ANNULLERETE I CAMBIAMENTI AVVENUTI) "
#: nano.c:1913
msgid "Received SIGHUP"
} else if (fileptr->data[i] & 0x80)
/* Make 8 bit chars only 1 column! */
;
- else if (fileptr->data[i] < 32)
+ else if (fileptr->data[i] < 32 || fileptr->data[i] == 127)
tabs++;
}
virt_cur_x--;
if (i < mark_beginx)
virt_mark_beginx--;
+ } else if (realdata[i] == 127) {
+ /* Treat control characters as ^symbol (ASCII 1 - 31, 127) */
+ fileptr->data[pos++] = '^';
+ fileptr->data[pos++] = '?';
} else if (realdata[i] >= 1 && realdata[i] <= 31) {
- /* Treat control characters as ^letter */
fileptr->data[pos++] = '^';
fileptr->data[pos++] = realdata[i] + 64;
} else {