Explorar el Código

Added command to remove all image marks, bound to Ctrl-m; fixes issue #163

master
Bert Münnich hace 10 años
padre
commit
1094def183
Se han modificado 5 ficheros con 18 adiciones y 0 borrados
  1. +1
    -0
      README.md
  2. +12
    -0
      commands.c
  3. +1
    -0
      commands.lst
  4. +1
    -0
      config.def.h
  5. +3
    -0
      sxiv.1

+ 1
- 0
README.md Ver fichero

@@ -103,6 +103,7 @@ of small previews is displayed, making it easy to choose an image to open.
Ctrl-h,j,k,l Scroll one window width/height left/down/up/right Ctrl-h,j,k,l Scroll one window width/height left/down/up/right
m Mark/unmark current image m Mark/unmark current image
M Reverse all image marks M Reverse all image marks
Ctrl-m Remove all image marks
N Go [count] marked images forward N Go [count] marked images forward
P Go [count] marked images backward P Go [count] marked images backward




+ 12
- 0
commands.c Ver fichero

@@ -215,6 +215,18 @@ bool cg_reverse_marks(arg_t a)
return true; return true;
} }


bool cg_unmark_all(arg_t a)
{
int i;

for (i = 0; i < filecnt; i++)
files[i].marked = false;
markcnt = 0;
if (mode == MODE_THUMB)
tns.dirty = true;
return true;
}

bool cg_navigate_marked(arg_t a) bool cg_navigate_marked(arg_t a)
{ {
long n = (long) a; long n = (long) a;


+ 1
- 0
commands.lst Ver fichero

@@ -10,6 +10,7 @@ G_CMD(n_or_last)
G_CMD(scroll_screen) G_CMD(scroll_screen)
G_CMD(toggle_image_mark) G_CMD(toggle_image_mark)
G_CMD(reverse_marks) G_CMD(reverse_marks)
G_CMD(unmark_all)
G_CMD(navigate_marked) G_CMD(navigate_marked)


I_CMD(navigate) I_CMD(navigate)


+ 1
- 0
config.def.h Ver fichero

@@ -81,6 +81,7 @@ static const keymap_t keys[] = {
{ ControlMask, XK_Right, g_scroll_screen, (arg_t) DIR_RIGHT }, { ControlMask, XK_Right, g_scroll_screen, (arg_t) DIR_RIGHT },
{ 0, XK_m, g_toggle_image_mark, (arg_t) None }, { 0, XK_m, g_toggle_image_mark, (arg_t) None },
{ 0, XK_M, g_reverse_marks, (arg_t) None }, { 0, XK_M, g_reverse_marks, (arg_t) None },
{ ControlMask, XK_m, g_unmark_all, (arg_t) None },
{ 0, XK_N, g_navigate_marked, (arg_t) +1 }, { 0, XK_N, g_navigate_marked, (arg_t) +1 },
{ 0, XK_P, g_navigate_marked, (arg_t) -1 }, { 0, XK_P, g_navigate_marked, (arg_t) -1 },




+ 3
- 0
sxiv.1 Ver fichero

@@ -146,6 +146,9 @@ Mark/unmark the current image.
.B M .B M
Reverse all image marks. Reverse all image marks.
.TP .TP
.B Ctrl-m
Remove all image marks.
.TP
.B N .B N
Go Go
.I count .I count


Cargando…
Cancelar
Guardar