commit fab992d9be562bc73ad17c9854bbdbf4a02633ab
parent 299a8d4b41ef44db0d85b3cea29cd0b47385f3f0
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date: Fri, 5 Aug 2011 09:33:04 +0200
Ooooops manpage
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sandy.1 b/sandy.1
@@ -188,7 +188,7 @@ other way.
.B Ctrl\-z
Suspend editor to shell.
.TP
-.BR Ctrl\-[ " or " Esc
+.BR Meta\-x " or " Ctrl\-[ " or " Esc
Prompt for command.
.SH SEE ALSO
.IR dmenu (1),
diff --git a/sandy.c b/sandy.c
@@ -332,11 +332,11 @@ f_insert(const Arg *arg) {
Filepos newcur;
newcur=i_addtext((char*)arg->v, fcur);
- if((statusflags & S_GroupUndo) && undos && (undos->flags & UndoIns) && fcur.o == undos->endo && undos->endl == i_lineno(fcur.l))
+ if((statusflags & S_GroupUndo) && undos && (undos->flags & UndoIns) && fcur.o == undos->endo && undos->endl == i_lineno(fcur.l) && ((char*)arg->v)[0] != '\n')
i_addtoundo(newcur, arg->v);
else {
i_addundo(TRUE, fcur, newcur, strdup((char*)arg->v));
- fsel=fcur;
+ fsel=(fcur.l == newcur.l ? fcur : newcur);
}
fcur=newcur;
statusflags|=(S_Modified|S_GroupUndo);