hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=64bf39cc8397d124adc742f360c3de5ad44555d7

commit 64bf39cc8397d124adc742f360c3de5ad44555d7
Author: Hermet Park <[email protected]>
Date:   Thu Jul 7 16:33:59 2016 +0900

    syntax_indent: fix a incorrect parsing.
    
    Current cursor can be moving over by 1.
    it occured broken indentation in a template insert corner case.
---
 src/lib/syntax_indent.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/syntax_indent.c b/src/lib/syntax_indent.c
index 21b83ba..b60b9fa 100644
--- a/src/lib/syntax_indent.c
+++ b/src/lib/syntax_indent.c
@@ -26,15 +26,16 @@ typedef struct indent_line_s
 static int
 indent_depth_get(indent_data *id EINA_UNUSED, char *src, int pos)
 {
+   const char *quot = "\"";
+   const int quot_len = 1;
+
    if (!src || (pos < 1)) return 0;
 
    int depth = 0;
-   const char *quot = "\"";
-   int quot_len = 1; // strlen("&quot;");
    char *cur = (char *) src;
    char *end = ((char *) src) + pos;
 
-   while (cur && (cur <= end))
+   while (cur && (cur < end))
      {
         //Skip "" range
         if (*cur == *quot)

-- 


Reply via email to