sandy

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

commit fae5df655a6a961d6c03508dc588657a21e87b2f
parent 01ff300e87ad69c3dff71de8853ea1a80b33c72d
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date:   Sat, 13 Aug 2011 13:10:03 +0200

Return original f_extsel() behavior.
Diffstat:
sandy.1 | 2+-
sandy.c | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sandy.1 b/sandy.1 @@ -120,7 +120,7 @@ search backwards. Repeat search backwards. .TP .B Ctrl\-\] -Extend selection to line, or full file from current. +Extend selection to word, line or full file from current. .TP .B Ctrl\-g Cancel current selection. diff --git a/sandy.c b/sandy.c @@ -313,7 +313,8 @@ f_extsel(const Arg *arg) { case ExtDefault: default: if(fsel.o == 0 && fcur.o == fcur.l->len) f_extsel(&(const Arg){.i = ExtAll}); - else f_extsel(&(const Arg){.i = ExtLines}); + else if (t_sel() || ISWORDBRK(fcur.l->c[fcur.o])) f_extsel(&(const Arg){.i = ExtLines}); + else f_extsel(&(const Arg){.i = ExtWord}); } }