summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2021-06-12 23:34:41 -0300
committerAndrés <andmarti@gmail.com>2021-06-12 23:34:41 -0300
commit549c09f47279c0b6b010af4414dce6b97dcda69d (patch)
tree0c34e00196823aa03fff51e2e2821159bc80526d /src
parent1bfe77ca8739be96d681c10dc7f2485b223c17d7 (diff)
work on issue 575
Diffstat (limited to 'src')
-rw-r--r--src/cmds/cmds_normal.c16
-rw-r--r--src/interp.c3
2 files changed, 12 insertions, 7 deletions
diff --git a/src/cmds/cmds_normal.c b/src/cmds/cmds_normal.c
index d572e79..ff23f46 100644
--- a/src/cmds/cmds_normal.c
+++ b/src/cmds/cmds_normal.c
@@ -415,12 +415,14 @@ void do_normalmode(struct block * buf) {
struct roman * roman = session->cur_doc;
struct sheet * sh = roman->cur_sh;
extern struct go_save gs;
- if (gs.g_sheet == sh)
+ if (gs.g_sheet == sh) {
go_previous();
- else if (gs.g_type == G_NUM)
+ } else if (gs.g_type == G_NUM) {
num_search(sh, gs.g_n, 0, 0, sh->maxrow, sh->maxcol, 0, gs.g_flow);
- else if (gs.g_type == G_STR)
+ } else if (gs.g_type == G_STR) {
+ gs.g_type = G_NONE; /* Don't free the string */
str_search(sh, gs.g_s, 0, 0, sh->maxrow, sh->maxcol, 0, gs.g_flow);
+ }
ui_update(TRUE);
}
break;
@@ -431,12 +433,14 @@ void do_normalmode(struct block * buf) {
struct roman * roman = session->cur_doc;
struct sheet * sh = roman->cur_sh;
extern struct go_save gs;
- if (gs.g_sheet == sh)
+ if (gs.g_sheet == sh) {
go_last();
- else if (gs.g_type == G_NUM)
+ } else if (gs.g_type == G_NUM) {
num_search(sh, gs.g_n, 0, 0, sh->maxrow, sh->maxcol, 0, gs.g_flow);
- else if (gs.g_type == G_STR)
+ } else if (gs.g_type == G_STR) {
+ gs.g_type = G_NONE; /* Don't free the string */
str_search(sh, gs.g_s, 0, 0, sh->maxrow, sh->maxcol, 0, gs.g_flow);
+ }
ui_update(TRUE);
}
break;
diff --git a/src/interp.c b/src/interp.c
index 4df216b..4fd9f7a 100644
--- a/src/interp.c
+++ b/src/interp.c
@@ -1170,7 +1170,8 @@ void str_search(struct sheet * sh, char * s, int firstrow, int firstcol, int las
regex_t preg;
int errcode;
- if ( get_conf_int("ignorecase"))
+ sc_info("");
+ if (get_conf_int("ignorecase"))
errcode = regcomp(&preg, s, REG_EXTENDED | REG_ICASE);
else
errcode = regcomp(&preg, s, REG_EXTENDED);