vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 95136c133f04e7081a31ea1f6207c42ad4f158d1 parent 368850064cebc98792a436818001d0d9dedce792 Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 16 May 2015 15:33:42 +0200 Release macro data Diffstat:
| M | editor.c | | | 2 | ++ |
| M | editor.h | | | 4 | +++- |
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/editor.c b/editor.c @@ -411,6 +411,8 @@ void editor_free(Editor *ed) { text_regex_free(ed->search_pattern); for (int i = 0; i < REG_LAST; i++) register_release(&ed->registers[i]); + for (int i = 0; i < MACRO_LAST; i++) + macro_release(&ed->macros[i]); editor_syntax_unload(ed); ed->ui->free(ed->ui); map_free(ed->cmds); diff --git a/editor.h b/editor.h @@ -214,6 +214,8 @@ struct Win { Win *prev, *next; /* neighbouring windows */ }; +#define MACRO_LAST 26 + struct Editor { Ui *ui; File *files; @@ -221,7 +223,7 @@ struct Editor { Win *win; /* currently active window */ Syntax *syntaxes; /* NULL terminated array of syntax definitions */ Register registers[REG_LAST]; /* register used for copy and paste */ - Macro macros[26]; /* recorded macros */ + Macro macros[MACRO_LAST]; /* recorded macros */ Macro *recording, *last_recording;/* currently and least recently recorded macro */ Win *prompt; /* 1-line height window to get user input */ Win *prompt_window; /* window which was focused before prompt was shown */