From 0f35467395910cc0bed2b40fdbbc91998f97ac41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 10 Jan 2017 10:51:18 +0100 Subject: sam: implement parallel grouping behavior --- vis-core.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index 1015db1..bb20746 100644 --- a/vis-core.h +++ b/vis-core.h @@ -3,6 +3,7 @@ #include #include "vis.h" +#include "sam.h" #include "vis-lua.h" #include "register.h" #include "text.h" @@ -107,6 +108,12 @@ typedef struct { /** collects all information until an operator is e Arg arg; } Action; +typedef struct Change Change; +typedef struct { + Change *changes; /* all changes in monotonically increasing file position */ + enum SamError error; /* non-zero in case something went wrong */ +} Transcript; + struct File { /* shared state among windows displaying the same file */ Text *text; /* data structure holding the file content */ const char *name; /* file name used when loading/saving */ @@ -117,6 +124,7 @@ struct File { /* shared state among windows displaying the same file */ int refcount; /* how many windows are displaying this file? (always >= 1) */ Mark marks[VIS_MARK_INVALID]; /* marks which are shared across windows */ enum TextSaveMethod save_method; /* whether the file is saved using rename(2) or overwritten */ + Transcript transcript; /* keeps track of changes performed by sam commands */ File *next, *prev; }; -- cgit v1.2.3