diff options
author | mongo <andmarti@gmail.com> | 2017-02-23 12:43:23 -0300 |
---|---|---|
committer | mongo <andmarti@gmail.com> | 2017-02-23 12:43:23 -0300 |
commit | f195e0e4765644677d7904759b769e61a492a080 (patch) | |
tree | 0e8bb76421cf4e55b1a136bd9c3cadb8cf98a18f /src/interp.c | |
parent | 0917711575ab4cb6c8fea2f2a1c712ce58706dba (diff) |
new fix in goto command
Diffstat (limited to 'src/interp.c')
-rw-r--r-- | src/interp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/interp.c b/src/interp.c index 7efdef6..8e0ee30 100644 --- a/src/interp.c +++ b/src/interp.c @@ -1668,7 +1668,6 @@ void str_search(char *s, int firstrow, int firstcol, int lastrow_, int lastcol_, c = endc; while (1) { - if (flow) { // search forward if (c < lastcol_) c++; @@ -1677,8 +1676,9 @@ void str_search(char *s, int firstrow, int firstcol, int lastrow_, int lastcol_, while (++r < lastrow_ && row_hidden[r]) /* */; c = firstcol; } else { - r = firstrow; - c = firstcol; + r = endr; + c = endc; + break; } } } else { // search backwards @@ -1689,8 +1689,9 @@ void str_search(char *s, int firstrow, int firstcol, int lastrow_, int lastcol_, while (--r > firstrow && row_hidden[r]) /* */; c = lastcol_; } else { - r = lastrow_; - c = lastcol_; + r = endr; + c = endc; + break; } } } @@ -1724,10 +1725,8 @@ void str_search(char *s, int firstrow, int firstcol, int lastrow_, int lastcol_, } } if (! col_hidden[c]) { - if (gs.g_type == G_STR && p && p->label && - regexec(&preg, p->label, 0, NULL, 0) == 0) { + if (gs.g_type == G_STR && p && p->label && regexec(&preg, p->label, 0, NULL, 0) == 0) break; - } } else /* gs.g_type != G_STR */ if (*line != '\0' && (regexec(&preg, line, 0, NULL, 0) == 0)) break; @@ -1747,9 +1746,8 @@ void str_search(char *s, int firstrow, int firstcol, int lastrow_, int lastcol_, colsinrange = fwidth[curcol]; regfree(&preg); if (loading) { - //update(1); changed = 0; - } //else remember(1); + } } /* fill a range with constants */ |