mirror of
https://gittea.dev/nova/th.git
synced 2025-10-21 18:30:15 -04:00
refractoring, fixed enter_shell
This commit is contained in:
@@ -523,16 +523,25 @@ void update(){
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL);
|
||||
}
|
||||
void enter_shell(int passes, int index){
|
||||
(void)passes;
|
||||
|
||||
endwin();
|
||||
if (system(key_binding[index].black_magic) != 0) {
|
||||
/*do nothing*/
|
||||
}
|
||||
initscr();
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL);
|
||||
}
|
||||
void not_implemented(int passes, int index){
|
||||
mvaddstr(terminal_height-1, 0, key_binding[index].comment);
|
||||
mvaddstr(terminal_height-1, strlen(key_binding[index].comment), "\t");
|
||||
mvaddstr(terminal_height-1, strlen(key_binding[index].comment) + strlen("\t"), "is not yet implemented");
|
||||
(void)passes;
|
||||
|
||||
mvaddstr(terminal_height-1, 0, key_binding[index].comment);
|
||||
mvaddstr(terminal_height-1, strlen(key_binding[index].comment), "\t");
|
||||
mvaddstr(terminal_height-1, strlen(key_binding[index].comment) + strlen("\t"), "is not yet implemented");
|
||||
}
|
||||
void jump_to_dir(int passes, int index){
|
||||
(void)passes;
|
||||
|
||||
char *ch = (char*)key_binding[index].black_magic;
|
||||
char slash = 0;
|
||||
unsigned int env_len = 0;
|
||||
@@ -588,11 +597,14 @@ void jump_to_dir(int passes, int index){
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY);
|
||||
}
|
||||
void order_by(int passes, int index){
|
||||
|
||||
(void)passes;
|
||||
|
||||
order_func = key_binding[index].black_magic;
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY);
|
||||
}
|
||||
void cmd_on_selected(int passes, int index){
|
||||
(void)passes;
|
||||
|
||||
unsigned int i = 0;
|
||||
unsigned int hits = 0;
|
||||
char *file_str = " ";
|
||||
@@ -675,6 +687,8 @@ void cmd_on_selected(int passes, int index){
|
||||
}
|
||||
}
|
||||
void yank_file(int passes, int index){
|
||||
(void)passes;
|
||||
|
||||
unsigned long i;
|
||||
if (yank_files.status & YANK_IS_USED) {
|
||||
free(yank_files.path);
|
||||
|
Reference in New Issue
Block a user