mirror of
https://gittea.dev/nova/th.git
synced 2026-01-30 16:50:10 -05:00
multiple small changes
This commit is contained in:
@@ -181,7 +181,7 @@ void move_down(unsigned long passes){
|
||||
selected_file_current += passes;
|
||||
|
||||
update_selected_file();
|
||||
dir_set_selected_file_current(selected_file_current);
|
||||
current_dir->selected_file_current = selected_file_current;
|
||||
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_0);
|
||||
pthread_mutex_unlock(&mutex_selection);
|
||||
@@ -198,7 +198,8 @@ void move_up(unsigned long passes){
|
||||
}
|
||||
|
||||
update_selected_file();
|
||||
dir_set_selected_file_current(selected_file_current);
|
||||
current_dir->selected_file_current = selected_file_current;
|
||||
|
||||
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK);
|
||||
pthread_mutex_unlock(&mutex_selection);
|
||||
@@ -294,7 +295,7 @@ void jump_bottom(){
|
||||
pthread_mutex_lock(&mutex_selection);
|
||||
selected_file_current = 0 - 1;
|
||||
update_selected_file();
|
||||
dir_set_selected_file_current(selected_file_current);
|
||||
current_dir->selected_file_current = selected_file_current;
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK);
|
||||
pthread_mutex_unlock(&mutex_selection);
|
||||
}
|
||||
@@ -302,7 +303,7 @@ void jump_top(){
|
||||
pthread_mutex_lock(&mutex_selection);
|
||||
selected_file_current = 0;
|
||||
update_selected_file();
|
||||
dir_set_selected_file_current(selected_file_current);
|
||||
current_dir->selected_file_current = selected_file_current;
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK);
|
||||
pthread_mutex_unlock(&mutex_selection);
|
||||
}
|
||||
@@ -341,9 +342,11 @@ void open_with(){
|
||||
images_clear();
|
||||
#endif
|
||||
|
||||
endwin();
|
||||
if (system(cmd) == -1) {
|
||||
FAIL("open_with", "creating subcommand failed unhandled");
|
||||
}
|
||||
initscr();
|
||||
}
|
||||
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL);
|
||||
@@ -683,6 +686,7 @@ void cmd_on_selected(unsigned long passes, int index){
|
||||
/* the second loop is used to add "./", wich is not being printed" */
|
||||
char *cmd = malloc(sizeof(char));
|
||||
/* TODO(2025-07-06T07:23:05) IMPORTANT: this really fucks up when the file has a quotation mark in its name */
|
||||
endwin();
|
||||
if (hits) {
|
||||
for (i = 0; i < mid_file_count; i++) {
|
||||
if (mid_content[i].status & FILE_STATUS_SELECTED) {
|
||||
@@ -708,6 +712,7 @@ void cmd_on_selected(unsigned long passes, int index){
|
||||
}
|
||||
/*system(cmd);*/
|
||||
free(cmd);
|
||||
initscr();
|
||||
|
||||
}
|
||||
free(btm_buffer);
|
||||
@@ -892,7 +897,7 @@ void search(){
|
||||
|
||||
curs_set(0);
|
||||
|
||||
dir_set_selected_file_current(selected_file_current);
|
||||
current_dir->selected_file_current = selected_file_current;
|
||||
|
||||
update_selected_file();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user