Code

list_window: Added message when selection is enabled/disabled.
authorPatrick Hallen <patrick.hallen@rwth-aachen.de>
Wed, 11 Feb 2009 19:52:53 +0000 (20:52 +0100)
committerPatrick Hallen <patrick.hallen@rwth-aachen.de>
Wed, 11 Feb 2009 19:52:53 +0000 (20:52 +0100)
The user should get a visual feedback, when he enables or disables the visual selection,
so I added a message which is shown in the status screen. Perhaps there should be a flag
on the right top, when visual selection is enabled to not confuse users, who accidentally
enable it.

src/list_window.c

index 4cd9a8f6009c241d2ee56700b4f4fbd24b8aeef0..c09844082ac2e20f5ec3194d5bd9b5d5cb6d5378 100644 (file)
@@ -24,6 +24,8 @@
 #include "match.h"
 #include "command.h"
 #include "colors.h"
+#include "screen.h"
+#include "i18n.h"
 
 #include <assert.h>
 #include <stdlib.h>
@@ -382,11 +384,13 @@ list_window_cmd(struct list_window *lw, unsigned rows, command_t cmd)
        case CMD_LIST_VISUAL_SELECT:
                if(lw->visual_selection)
                {
+                       screen_status_printf(_("Visual selection disabled"));
                        lw->visual_selection = false;
                        list_window_set_selected(lw, lw->selected);
                }
                else
                {
+                       screen_status_printf(_("Visual selection enabled"));
                        lw->visual_base = lw->selected;
                        lw->visual_selection = true;
                }