Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/extern/isocline/src/undo.h
2727 views
1
/* ----------------------------------------------------------------------------
2
Copyright (c) 2021, Daan Leijen
3
This is free software; you can redistribute it and/or modify it
4
under the terms of the MIT License. A copy of the license can be
5
found in the "LICENSE" file at the root of this distribution.
6
-----------------------------------------------------------------------------*/
7
#pragma once
8
#ifndef IC_UNDO_H
9
#define IC_UNDO_H
10
11
#include "common.h"
12
13
//-------------------------------------------------------------
14
// Edit state
15
//-------------------------------------------------------------
16
struct editstate_s;
17
typedef struct editstate_s editstate_t;
18
19
ic_private void editstate_init( editstate_t** es );
20
ic_private void editstate_done( alloc_t* mem, editstate_t** es );
21
ic_private void editstate_capture( alloc_t* mem, editstate_t** es, const char* input, ssize_t pos);
22
ic_private bool editstate_restore( alloc_t* mem, editstate_t** es, const char** input, ssize_t* pos ); // caller needs to free input
23
24
#endif // IC_UNDO_H
25
26