]> git.deb.at Git - pkg/abook.git/blobdiff - ui.c
add show_cursor config option
[pkg/abook.git] / ui.c
diff --git a/ui.c b/ui.c
index aa49d48d5e23b6f92d002a91dc7ee267315dd09e..2799039ca11b0d7d76e146cee03081fde9ff26fa 100644 (file)
--- a/ui.c
+++ b/ui.c
@@ -375,13 +375,15 @@ get_commands()
 
        for(;;) {
                can_resize = TRUE; /* it's safe to resize now */
-               hide_cursor();
-               if( should_resize )
+               if(!opt_get_bool(BOOL_SHOW_CURSOR))
+                       hide_cursor();
+               if(should_resize)
                        refresh_screen();
                ch = getch();
-               show_cursor();
+               if(!opt_get_bool(BOOL_SHOW_CURSOR))
+                       show_cursor();
                can_resize = FALSE; /* it's not safe to resize anymore */
-               switch( ch ) {
+               switch(ch) {
                        case 'q': return;
                        case 'Q': quit_abook(QUIT_DONTSAVE);    break;
                        case 'P': print_stderr(selected_items() ?
@@ -500,16 +502,14 @@ ui_find(int next)
                        return;
        } else {
                char *s;
-               clear_statusline();
                s = ui_readline("/", findstr, MAX_FIELD_LEN - 1, 0);
                strncpy(findstr, s, MAX_FIELD_LEN);
                refresh_screen();
        }
 
-       if( (item = find_item(findstr, curitem + !!next, search_fields)) < 0)
-               if((item = find_item(findstr, 0, search_fields)) >= 0)
-                       statusline_addstr(
-                               "Search hit bottom, continuing at top");
+       if( (item = find_item(findstr, curitem + !!next, search_fields)) < 0 &&
+                       (item = find_item(findstr, 0, search_fields)) >= 0)
+               statusline_addstr("Search hit bottom, continuing at top");
 
        if(item >= 0) {
                curitem = item;