sandy

text editor
git clone git://git.suckless.org/sandy
Log | Files | Refs | README | LICENSE

commit c121b9c1758c30446da2ea2556a8c3c2991053e4
parent 13d74dd2d51032402c1b5b7d8adf401ce7f4404f
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date:   Mon,  6 Jun 2011 00:49:07 +0200

Make automatic mark placement a bit more intelligent.
Diffstat:
sandy.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sandy.c b/sandy.c @@ -843,6 +843,7 @@ i_find(bool fw) { if ((status=regexec(find_res[sel_re], s, 1, result, (fw?(fcur.o==0 ? 0 : REG_NOTBOL): fsel.o==fsel.l->len?0:REG_NOTEOL))) == 0) { + f_mark(NULL); if(wp || !fw) fcur=start; fsel=fcur; @@ -861,7 +862,6 @@ i_find(bool fw) { } i_advpos(&fsel, _so); i_advpos(&fcur, _eo); - f_mark(NULL); wp++; } } @@ -1629,6 +1629,7 @@ m_tomark(Filepos pos) { pos.o=fmrk.o; if(pos.o>pos.l->len) pos.o=pos.l->len; FIXNEXT(pos); + f_mark(NULL); break; } return pos;