syntaxfile_regexp and synfilematches. Global flag -Y ,--syntax
to specify the type on the command line, if there's no good
filename regex to use. Global variable syntaxstr.
- - Made some rc file errors less fatal.
- configure.ac:
- Define NDEBUG to silence asserts (David Benbennick).
- files.c:
- Optimizations (David Benbennick).
do_wrap()
- Complete rewrite (David Benbennick).
+ main()
+ - Changed charalloc(), strcpy()s to mallocstrcpy()s.
- nano.h:
- NANO_ALT_COMMAND and NANO_ALT_PERIOD were reversed (lol)
(David Benbennick).
by default (Im an idiot).
- nano.1:
- Changed references to Debian GNU/Linux to Debian GNU (Jordi).
+- rcfile.c
+ - Made some rc file errors less fatal.
+- winio.c:
+ edit_add()
+ - Changed some syntax hilight computations for the sake of COLS.
- po/gl.po:
- Galician translation updates (Jacobo Tarrio).
- po/de.po:
break;
#ifndef DISABLE_OPERATINGDIR
case 'o':
- operating_dir = charalloc(strlen(optarg) + 1);
- strcpy(operating_dir, optarg);
+ operating_dir = mallocstrcpy(operating_dir, optarg);
/* make sure we're inside the operating directory */
if (check_operating_dir(".", 0)) {
#endif
#ifndef DISABLE_SPELLER
case 's':
- alt_speller = charalloc(strlen(optarg) + 1);
- strcpy(alt_speller, optarg);
+ alt_speller = mallocstrcpy(alt_speller, optarg);
break;
#endif
case 't':
colormatches, 0)) {
if (colormatches[0].rm_eo - colormatches[0].rm_so < 1) {
- statusbar("Refusing 0 length regex match");
+ statusbar(_("Refusing 0 length regex match"));
break;
}
#ifdef DEBUG
wattron(edit, A_BOLD);
wattron(edit, COLOR_PAIR(tmpcolor->pairnum));
- if (colormatches[0].rm_eo + k <= COLS)
+ if (colormatches[0].rm_eo + k <= COLS) {
paintlen =
colormatches[0].rm_eo - colormatches[0].rm_so;
- else
+#ifdef DEBUG
+ fprintf(stderr, "paintlen (%d) = eo (%d) - so (%d)\n",
+ paintlen, colormatches[0].rm_eo, colormatches[0].rm_so);
+#endif
+
+ }
+ else {
paintlen = COLS - k - colormatches[0].rm_so - 1;
+#ifdef DEBUG
+ fprintf(stderr, "paintlen (%d) = COLS (%d) - k (%d), - rm.so (%d) - 1\n",
+ paintlen, COLS, k, colormatches[0].rm_so);
+#endif
+ }
mvwaddnstr(edit, yval, colormatches[0].rm_so + k,
&fileptr->data[k + colormatches[0].rm_so],
wattron(edit, COLOR_PAIR(tmpcolor->pairnum));
- if (s == fileptr && e == fileptr)
+ if (s == fileptr && e == fileptr && ematch < COLS) {
mvwaddnstr(edit, yval, start + smatch,
&fileptr->data[start + smatch],
ematch - smatch);
- else if (s == fileptr)
+#ifdef DEBUG
+ fprintf(stderr, "start = %d, smatch = %d, ematch = %d\n", start,
+ smatch, ematch);
+#endif
+
+ } else if (s == fileptr)
mvwaddnstr(edit, yval, start + smatch,
&fileptr->data[start + smatch],
COLS - smatch);
else if (e == fileptr)
mvwaddnstr(edit, yval, start,
&fileptr->data[start],
- ematch - start);
+ COLS - start);
else
mvwaddnstr(edit, yval, start,
&fileptr->data[start],