sandy

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

commit ef0ce7608514c768177c17196dc03b2bc17e9844
parent 3bd2dae1437ea1f33697501b737332e69f35a52a
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date:   Mon, 30 May 2011 01:11:19 +0200

Little simplification regarding m_(prev|next)scr.
Diffstat:
sandy.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sandy.c b/sandy.c @@ -1506,8 +1506,7 @@ m_nextscr(Filepos pos) { for(i=LINES2,l=pos.l; l->next && i>0; i-=VLINES(l), l=l->next); pos.l=l; - if(pos.o>pos.l->len) pos.o=pos.l->len; - FIXNEXT(pos); + pos.o=pos.l->len; return pos; } @@ -1518,8 +1517,7 @@ m_prevscr(Filepos pos) { for(i=LINES2,l=pos.l; l->prev && i>0; i-=VLINES(l), l=l->prev); pos.l=l; - if(pos.o>pos.l->len) pos.o=pos.l->len; - FIXNEXT(pos); + pos.o=0; return pos; }