aboutsummaryrefslogtreecommitdiff
path: root/vterm-module.h
diff options
context:
space:
mode:
authorBlahGeek <i@blahgeek.com>2021-02-14 19:43:06 +0800
committerBlahGeek <i@blahgeek.com>2021-02-14 19:43:06 +0800
commit292825094ba976f2b16fd92315ce458c59792625 (patch)
treec60a105377c3884c0cf17165a68cb46a4e1916ff /vterm-module.h
parenta3fadd28370aa43f03d4f7b197be8fa074f311f5 (diff)
Allow multiple elisp_code commands between redraws
Diffstat (limited to 'vterm-module.h')
-rw-r--r--vterm-module.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/vterm-module.h b/vterm-module.h
index 78964a7..e642b76 100644
--- a/vterm-module.h
+++ b/vterm-module.h
@@ -30,6 +30,12 @@ typedef struct ScrollbackLine {
VTermScreenCell cells[];
} ScrollbackLine;
+typedef struct ElispCodeListNode {
+ char* code;
+ size_t code_len;
+ struct ElispCodeListNode* next;
+} ElispCodeListNode;
+
/* c , p , q , s , 0 , 1 , 2 , 3 , 4 , 5 , 6 , and 7 */
/* clipboard, primary, secondary, select, or cut buffers 0 through 7 */
#define SELECTION_TARGET_MAX 12
@@ -71,8 +77,10 @@ typedef struct Term {
char *directory;
bool directory_changed;
- char *elisp_code;
- bool elisp_code_changed;
+ // Single-linked list of elisp_code.
+ // Newer commands are added at the tail.
+ ElispCodeListNode* elisp_code_first;
+ ElispCodeListNode** elisp_code_p_insert; // pointer to the position where new node should be inserted
/* c , p , q , s , 0 , 1 , 2 , 3 , 4 , 5 , 6 , and 7 */
/* clipboard, primary, secondary, select, or cut buffers 0 through 7 */