billiob pushed a commit to branch terminology-0.9.

http://git.enlightenment.org/apps/terminology.git/commit/?id=01ff1e1d8ad61ae7a0a9ac90064bb3a07702d978

commit 01ff1e1d8ad61ae7a0a9ac90064bb3a07702d978
Author: Boris Faure <bill...@gmail.com>
Date:   Sun Sep 20 15:42:28 2015 +0200

    do not right trim "." on word selection
    
    this makes double click on "../foobar"
---
 src/bin/termio.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index 4357e42..3c09219 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2802,7 +2802,7 @@ _codepoint_is_wordsep(const Eina_Unicode g)
 }
 
 static Eina_Bool
-_to_trim(Eina_Unicode codepoint)
+_to_trim(Eina_Unicode codepoint, Eina_Bool right_trim)
 {
    static const Eina_Unicode trim_chars[] =
      {
@@ -2813,6 +2813,8 @@ _to_trim(Eina_Unicode codepoint)
      };
    size_t i = 0, len;
    len = sizeof(trim_chars)/sizeof((trim_chars)[0]);
+   if (right_trim)
+     len--; /* do not right trim . */
 
    for (i = 0; i < len; i++)
      if (codepoint == trim_chars[i])
@@ -2836,7 +2838,7 @@ _trim_sel_word(Termio *sd)
      {
         cells = termpty_cellrow_get(pty, y, &w);
 
-        while (start < w && _to_trim(cells[start].codepoint))
+        while (start < w && _to_trim(cells[start].codepoint, EINA_TRUE))
           start++;
 
         if (start < w)
@@ -2864,7 +2866,7 @@ _trim_sel_word(Termio *sd)
      {
         cells = termpty_cellrow_get(pty, y, &w);
 
-        while (end >= 0 && _to_trim(cells[end].codepoint))
+        while (end >= 0 && _to_trim(cells[end].codepoint, EINA_FALSE))
           end--;
 
         if (end >= 0)

-- 


Reply via email to