Merge branch '2859_mcedit_ctags_segfault'

* 2859_mcedit_ctags_segfault:
  Ticket #2859 (mcedit ctags fix)
This commit is contained in:
Ilia Maslakov 2012-08-21 13:10:53 +04:00
commit 4bfa681069
3 changed files with 4 additions and 3 deletions

View File

@ -151,7 +151,7 @@ extern int enable_show_tabs_tws;
extern edit_search_options_t edit_search_options;
extern int edit_stack_iterator;
extern unsigned int edit_stack_iterator;
extern edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO];
extern int option_line_state_width;

View File

@ -103,7 +103,7 @@ int show_right_margin = 0;
const char *option_whole_chars_search = "0123456789abcdefghijklmnopqrstuvwxyz_";
char *option_backup_ext = NULL;
int edit_stack_iterator = 0;
unsigned int edit_stack_iterator = 0;
edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO];
/* magic sequense for say than block is vertical */
const char VERTICAL_MAGIC[] = { '\1', '\1', '\1', '\1', '\n' };

View File

@ -3492,7 +3492,8 @@ edit_load_back_cmd (WEdit * edit)
return TRUE;
}
if (edit_stack_iterator < 0)
/* we are in the bottom of the stack, NO WAY! */
if (edit_stack_iterator == 0)
return FALSE;
edit_stack_iterator--;