aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-21 00:57:08 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-21 00:57:08 +0200
commit96a64fb892e21e6f49e5b03a34bacfc54e82cb2c (patch)
tree118619604dab415ef8e38baa0de9f21e700d0043
parentd577aaaffc5398ae59558e888071e8214c6cd852 (diff)
the find list has it's own cursor
That prevents to have the selections to collide between the search list result and the main window. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--display.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/display.c b/display.c
index 23a4172..e1d1325 100644
--- a/display.c
+++ b/display.c
@@ -280,6 +280,7 @@ struct find_data {
size_t len;
char *string;
regex_t *reg;
+ int ocursor;
};
struct find_data *display_find_form_init(void)
@@ -312,6 +313,13 @@ struct find_data *display_find_form_init(void)
findd->string = search4;
findd->reg = reg;
findd->len = len;
+
+ /* save the location of the cursor on the main window in order to
+ * browse the search result
+ */
+ findd->ocursor = windata[current_win].cursor;
+ windata[current_win].cursor = 0;
+
out:
return findd;
@@ -327,6 +335,7 @@ out_free_reg:
static void display_find_form_fini(struct find_data *fd)
{
+ windata[current_win].cursor = fd->ocursor;
regfree(fd->reg);
free(fd->string);
free(fd);