File src/hstr.c changed (mode: 100644) (index 617c096..946df91) |
... |
... |
void highlight_selection(int selectionCursorPosition, int previousSelectionCurso |
403 |
403 |
|
|
404 |
404 |
void selection_remove(char *cmd, HistoryItems *history) |
void selection_remove(char *cmd, HistoryItems *history) |
405 |
405 |
{ |
{ |
406 |
|
if(history->count) { |
|
407 |
|
int i, w; |
|
408 |
|
for(i=0, w=0; i<history->count; i++) { |
|
409 |
|
if(strcmp(history->items[i], cmd)) { |
|
410 |
|
history->items[w]=history->items[i]; |
|
411 |
|
w++; |
|
|
406 |
|
if(historyView==HH_VIEW_FAVORITES) { |
|
407 |
|
if(history->favorites->count) { |
|
408 |
|
|
|
409 |
|
selection must be remade & shown OR move the favorites remove code to here |
|
410 |
|
|
|
411 |
|
int i, w; |
|
412 |
|
for(i=0, w=0; i<history->count; i++) { |
|
413 |
|
if(strcmp(history->items[i], cmd)) { |
|
414 |
|
history->items[w]=history->items[i]; |
|
415 |
|
w++; |
|
416 |
|
} |
|
417 |
|
} |
|
418 |
|
history->count=w; |
|
419 |
|
|
|
420 |
|
} |
|
421 |
|
} else { |
|
422 |
|
if(history->count) { |
|
423 |
|
int i, w; |
|
424 |
|
for(i=0, w=0; i<history->count; i++) { |
|
425 |
|
if(strcmp(history->items[i], cmd)) { |
|
426 |
|
history->items[w]=history->items[i]; |
|
427 |
|
w++; |
|
428 |
|
} |
412 |
429 |
} |
} |
|
430 |
|
history->count=w; |
413 |
431 |
} |
} |
414 |
|
history->count=w; |
|
415 |
432 |
} |
} |
416 |
433 |
} |
} |
417 |
434 |
|
|