mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
mceditor: last_bracket: make member of WEdit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
e7dc599e42
commit
6b0ee515ad
@ -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;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user