diff --git a/src/editor/edit-impl.h b/src/editor/edit-impl.h index 98472ee85..7a7a2d50e 100644 --- a/src/editor/edit-impl.h +++ b/src/editor/edit-impl.h @@ -109,12 +109,6 @@ typedef struct edit_search_options_t gboolean all_codepages; } edit_search_options_t; -typedef struct edit_stack_type -{ - long line; - vfs_path_t *filename_vpath; -} edit_stack_type; - /*** global variables defined in .c file *********************************************************/ extern const char VERTICAL_MAGIC[5]; @@ -124,7 +118,7 @@ extern gboolean enable_show_tabs_tws; extern edit_search_options_t edit_search_options; extern unsigned int edit_stack_iterator; -extern edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO]; +extern edit_arg_t edit_history_moveto[MAX_HISTORY_MOVETO]; extern int max_undo; extern gboolean auto_syntax; diff --git a/src/editor/edit.c b/src/editor/edit.c index e9b93156a..fc107cfc8 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -111,7 +111,7 @@ int max_undo = 32768; gboolean enable_show_tabs_tws = TRUE; unsigned int edit_stack_iterator = 0; -edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO]; +edit_arg_t edit_history_moveto[MAX_HISTORY_MOVETO]; /* magic sequence for say than block is vertical */ const char VERTICAL_MAGIC[] = { '\1', '\1', '\1', '\1', '\n' }; @@ -4136,8 +4136,8 @@ edit_stack_init (void) { for (edit_stack_iterator = 0; edit_stack_iterator < MAX_HISTORY_MOVETO; edit_stack_iterator++) { - edit_history_moveto[edit_stack_iterator].filename_vpath = NULL; - edit_history_moveto[edit_stack_iterator].line = -1; + edit_history_moveto[edit_stack_iterator].file_vpath = NULL; + edit_history_moveto[edit_stack_iterator].line_number = -1; } edit_stack_iterator = 0; @@ -4149,7 +4149,7 @@ void edit_stack_free (void) { for (edit_stack_iterator = 0; edit_stack_iterator < MAX_HISTORY_MOVETO; edit_stack_iterator++) - vfs_path_free (edit_history_moveto[edit_stack_iterator].filename_vpath, TRUE); + vfs_path_free (edit_history_moveto[edit_stack_iterator].file_vpath, TRUE); } /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index 32144b123..76c556a26 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -1977,13 +1977,13 @@ edit_load_forward_cmd (WEdit * edit) if (edit_stack_iterator + 1 >= MAX_HISTORY_MOVETO) return FALSE; - if (edit_history_moveto[edit_stack_iterator + 1].line < 1) + if (edit_history_moveto[edit_stack_iterator + 1].line_number < 1) return FALSE; edit_stack_iterator++; - if (edit_history_moveto[edit_stack_iterator].filename_vpath != NULL) - return edit_reload_line (edit, edit_history_moveto[edit_stack_iterator].filename_vpath, - edit_history_moveto[edit_stack_iterator].line); + if (edit_history_moveto[edit_stack_iterator].file_vpath != NULL) + return edit_reload_line (edit, edit_history_moveto[edit_stack_iterator].file_vpath, + edit_history_moveto[edit_stack_iterator].line_number); return FALSE; } @@ -2008,9 +2008,9 @@ edit_load_back_cmd (WEdit * edit) return FALSE; edit_stack_iterator--; - if (edit_history_moveto[edit_stack_iterator].filename_vpath != NULL) - return edit_reload_line (edit, edit_history_moveto[edit_stack_iterator].filename_vpath, - edit_history_moveto[edit_stack_iterator].line); + if (edit_history_moveto[edit_stack_iterator].file_vpath != NULL) + return edit_reload_line (edit, edit_history_moveto[edit_stack_iterator].file_vpath, + edit_history_moveto[edit_stack_iterator].line_number); return FALSE; } diff --git a/src/editor/etags.c b/src/editor/etags.c index ddc5ca8d6..8ef7e21d8 100644 --- a/src/editor/etags.c +++ b/src/editor/etags.c @@ -380,25 +380,25 @@ editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, GPtrArray if (curr != NULL && do_moveto && edit_stack_iterator + 1 < MAX_HISTORY_MOVETO) { - vfs_path_free (edit_history_moveto[edit_stack_iterator].filename_vpath, TRUE); + vfs_path_free (edit_history_moveto[edit_stack_iterator].file_vpath, TRUE); /* Is file path absolute? Prepend with dir_vpath if necessary */ if (edit->filename_vpath != NULL && edit->filename_vpath->relative && edit->dir_vpath != NULL) - edit_history_moveto[edit_stack_iterator].filename_vpath = + edit_history_moveto[edit_stack_iterator].file_vpath = vfs_path_append_vpath_new (edit->dir_vpath, edit->filename_vpath, NULL); else - edit_history_moveto[edit_stack_iterator].filename_vpath = + edit_history_moveto[edit_stack_iterator].file_vpath = vfs_path_clone (edit->filename_vpath); - edit_history_moveto[edit_stack_iterator].line = edit->start_line + edit->curs_row + 1; + edit_history_moveto[edit_stack_iterator].line_number = edit->start_line + edit->curs_row + 1; edit_stack_iterator++; - vfs_path_free (edit_history_moveto[edit_stack_iterator].filename_vpath, TRUE); - edit_history_moveto[edit_stack_iterator].filename_vpath = + vfs_path_free (edit_history_moveto[edit_stack_iterator].file_vpath, TRUE); + edit_history_moveto[edit_stack_iterator].file_vpath = vfs_path_from_str ((char *) curr_def->fullpath); - edit_history_moveto[edit_stack_iterator].line = curr_def->line; - edit_reload_line (edit, edit_history_moveto[edit_stack_iterator].filename_vpath, - edit_history_moveto[edit_stack_iterator].line); + edit_history_moveto[edit_stack_iterator].line_number = curr_def->line; + edit_reload_line (edit, edit_history_moveto[edit_stack_iterator].file_vpath, + edit_history_moveto[edit_stack_iterator].line_number); } }