commit 1a62e17e1d53dbe5048b31b8d8c5d9de556b7e58
parent 95eb0943dec359860e7822608c05a72b435c9208
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date: Thu, 26 May 2011 07:15:08 +0200
Pancake's comments and patch (1)
Diffstat:
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/config.mk b/config.mk
@@ -9,14 +9,14 @@ MANPREFIX = ${PREFIX}/share/man
# includes and libs (ncurses)
INCS = -I. -I/usr/include
-LIBS = -L/usr/lib -lc -lncursesw
+LIBS = -L/usr/lib -lc -lncurses
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\"
-#CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
-#LDFLAGS = -s ${LIBS}
-CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
-LDFLAGS = ${LIBS}
+CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+LDFLAGS = -s ${LIBS}
+#CFLAGS = -ggdb -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
+#LDFLAGS = ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
diff --git a/sandy.c b/sandy.c
@@ -620,6 +620,7 @@ i_cleanup(int sig) {
void /* Quit less gracefully */
i_die(char *str) {
+ reset_shell_mode();
fputs(str, stderr);
exit(1);
}
@@ -629,7 +630,7 @@ i_dirtyrange(Line *l0, Line *l1) {
Filepos pos0, pos1;
pos0.l=l0, pos1.l=l1, pos0.o=pos1.o=0;
i_sortpos(&pos0, &pos1);
- for(;pos0.l != pos1.l->next ;pos0.l=pos0.l->next) pos0.l->dirty=TRUE;
+ for(; pos0.l && pos0.l != pos1.l->next; pos0.l=pos0.l->next) pos0.l->dirty=TRUE;
}
void /* Delete text between pos0 and pos1, which MUST be in order, fcur and fsel integrity is NOT assured after deletion */