mceditor: last_bracket: make member of WEdit.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-05-27 16:34:58 +04:00 committed by Slava Zanko
parent e7dc599e42
commit 6b0ee515ad
2 changed files with 4 additions and 4 deletions

View File

@ -135,8 +135,6 @@ static const struct edit_filters
/* *INDENT-ON* */
};
static off_t last_bracket = -1;
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
@ -2276,6 +2274,7 @@ edit_init (WEdit * edit, int y, int x, int lines, int cols, const vfs_path_t * f
edit->over_col = 0;
edit->bracket = -1;
edit->last_bracket = -1;
edit->force |= REDRAW_PAGE;
/* set file name before load file */
@ -3517,9 +3516,9 @@ void
edit_find_bracket (WEdit * edit)
{
edit->bracket = edit_get_bracket (edit, 1, 10000);
if (last_bracket != edit->bracket)
if (edit->last_bracket != edit->bracket)
edit->force |= REDRAW_PAGE;
last_bracket = edit->bracket;
edit->last_bracket = edit->bracket;
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -128,6 +128,7 @@ struct WEdit
long column1; /* position of column highlight start */
long column2; /* position of column highlight end */
off_t bracket; /* position of a matching bracket */
off_t last_bracket; /* previous position of a matching bracket */
/* cache speedup for line lookups */
gboolean caches_valid;